Configuring Dual Boot [Flashable Configuration Zip v1.0 Released! 23 Jul 2012] - Atrix 4G Android Development

I developed a flashable zip to help configure dual boot. Zip is designed to be independent of ROM type, version and install method, whether by flashable zip, cloning primary ROM to SD, or in general copying a ROM system image to SD.
Then I overhauled this thread...
Config-Dual-Boot-v1.0-signed.zip: http://www.mediafire.com/?edgat0koyp7d33l
Backs up /sdcard[-ext]/Boot (if it exists) to /sdcard[-ext]/Boot.bak
Creates Boot/ROM1 and Boot/ROM2 directory paths under /sdcard[-ext]
Installs Script Manager on ROM1 and ROM2
Contains shell script “copy-boot.sh” to copy ROM boot partition to boot image file
Contains shell script “boot-rom.sh” to switch to boot ROM2 from ROM1 and vice versa
The updated “boot-rom.sh” script now features generic boot image directory names: Boot/ROM1 and Boot/ROM2, and automatically captures the SD Boot directory path (/sdcard for CM ROMs and /sdcard-ext for Blur ROMs).
Instructions:
1. Boot to ROM1 (emmc)
2. Reboot to CWM and flash: http://www.mediafire.com/?edgat0koyp7d33l . Doing so will backup any existing Boot directory under /sdcard[-ext] and push a new Boot directory containing empty subdirectories ROM1 and ROM2 and two shell scripts: copy-boot.sh (copy boot partition to image file) and boot-rom.sh (boot switcher).
In the following steps, the shell (sh) commands can be run using ADB (Android SDK Platform Tools), Terminal Emulator, Script Manager or other suitable app.
3. Reboot to ROM1
4. Enter: “sh /sdcard[-ext]/Boot/copy-boot.sh”. This detects which ROM is running, ROM1 in this case, and copies its boot image to /sdcard[-ext]/Boot/ROM1
5. Configure Script Manager to execute “sh boot-rom.sh 2” which enables booting to ROM2. But do not run this command until ROM2 “boot.img” is in place. We'll do that now.
6. Reboot to fastboot and connect phone to computer.
7. Enter: “fastboot flash boot boot.img” where boot.img is a boot image file modified to host ROM2 on SD. Please see my Auto-Modify Boot Image thread.
8. Enter: “fastboot reboot"
9. Enter: “sh /sdcard[-ext]/Boot/copy-boot.sh” as in step 4.
10. Configure Script Manager to execute “sh boot-rom.sh 1” which enables booting to ROM1.
More on configuring Script Manager:
Go to Settings > More > Advanced Options > Config > Home Directory. Set home directory to /sdcard/Boot. Then while still in SManager, navigate to /sdcard/Boot and press boot-rom.sh to configure. Valid arguments are:
Code:
blank: Reboot to current ROM
1: Reboot to ROM1 (emmc)
2: Reboot to ROM2 (SD)
3: Reboot to recovery
Press the “Su” box to run as root (note green symbol) and press “Save” at top right. Then press “Run” at top left to launch boot-rom.sh and reboot to the other ROM.
Place shortcut to Script Manager on home screen.
If all goes well, you can now boot ROM2 from ROM1 and vice versa with just a few screen taps.
This procedure was tested working with Neutrino V2.8 EE (CM) on emmc and NottachTrix 1.3.1 ATT (Blur) on SD.
Legacy YouTube video (3:38) showing reboots from one ROM to the other: http://www.youtube.com/watch?v=31TPyAguQ60
Credits
Special thanks to jokersax11, Notorious544d, ATRIXXIRTA, ghost_og, hatefuel19, J-Roc and many others for their technical direction, useful suggestions and encouragement. And of course to the Photon/Atrix/Android dev teams, Koush and https://sites.google.com/site/devwom/

Thanks a lot dude! Im going to try this!

how do you install two roms at the same time? i thought this was showing how to do that but im confused. how do you change the cwm zip installers to .img?
edit:: sorry i thought this was the other thread showing how to install a dual boot system but in fact its how to configure it to boot into them easier. sorry for the mixup ill defiantly read over your 1st thread

Note: Joker recommended as a refinement to place all apps in sdcard to keep apps common to both builds. Good idea.
Click to expand...
Click to collapse
Does this mean that across both on CM7 and CM9, the same apps will be installed? And if you install a new app, it will be seen in both CM7 and CM9?
And is data for apps accessible as well for both CM7 and CM9? So saving a data file with CM9 for example will be saved in /data and when I boot back into CM7, the same data I saved from CM9 will be there in CM7?
Lastly, did you manage to get that dalvik cache thingy working?
That's a lot of questions, but I hope you understand what I'm trying to say.
If it is, then WOW!

Notorious544d said:
Does this mean that across both on CM7 and CM9, the same apps will be installed? And if you install a new app, it will be seen in both CM7 and CM9?
And is data for apps accessible as well for both CM7 and CM9? So saving a data file with CM9 for example will be saved in /data and when I boot back into CM7, the same data I saved from CM9 will be there in CM7?
Lastly, did you manage to get that dalvik cache thingy working?
That's a lot of questions, but I hope you understand what I'm trying to say.
If it is, then WOW!
Click to expand...
Click to collapse
Thanks for the good questions. I haven't yet considered Joker's tip in detail as I spent most of yesterday writing this thread, researching other related topics (and watching Downton Abbey with my beloved wife ). But off the top, I assume that if a given app works on both ROMs, theoretically there should not be a problem hosting it and its corresponding data on the kitchen table (sdcard).
I guess one of the challenging questions is: Are there certain apps for which data should be kept separate to enable ROM-specific customization?

I just updated my thread with this...
"Alternatively (and actually preferred), you can extract the contents of this zip: http://www.mediafire.com/?0kdp4qvy6fv71kp to /sdcard. It makes ROM selections generic, and also fixes a problem with boot-rom.sh (Android shell apparently does not like trailing spaces in script files.) Then drop your boot.img files into /sdcard/Boot/ROM1 and ROM2 and you're good to go."
Cheers.

I developed a flashable zip to help configure dual boot. Zip is designed to be independent of ROM type, version and install method, whether flashable zip, cloning primary ROM to SD, or in general copying a ROM system image to SD.
Then I overhauled this thread...

Related

[TOOL] All-In-One ToolKit v6.0 |KDZ FLASH|ROOT|Repartitioning|SmartFlash|DualBoot

All-In-One Toolkit​
It is an easy to use tool (especially for noobs) with On-Screen instructions step-by-step to do what the following main menu screen says .. Read detailed information below.
!!! Open to suggestions and ideas !!!​
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
​
This toolkit runs under Windows. ​Installation Instructions:
Download the package from these links: Mirror1 Mirror2
Run the downloaded package and select a folder to extract the files (your user account must have write permissions in this folder). You can now extract it over a previous version because any un-needed previous files will be removed automatically.
SU660 Users: Download Both P990 & SU660-AddOn packages. Run & extract the P990 first and then extract in the same folder the SU660-AddOn. AIO-Toolkit will be converted to support SU660 device. ​Short & useful description for these options
1 - Backup/Restore Options.
A) Backup/Restore your internal SD Card (via USB Mass-Storage) which is taken with 7z open source tool. Auto-Detects the SD-card’s drive letter (by searching for external_sd or _ExteralSD folder). It just makes a compressed file (7z) of all the files in SD-card as backup action, and extracts this file in SD-card as restore action.
B) Backup/Restore ROM and/or Data partition with nvflash. Backup saves images under Bachup\OldLayout or Backup\NewLayout folder. Restore checks the sizes of current partitions and the backed up images and aborts restore if a partition is smaller than its image or warns if larger. It is needed because anyone now can resize the partitions easily with option 9. Note!! Smaller images can be restored to larger partitions but the final usable size will be the image’s one.​2 - Change your Recovery Image.
Easily change the recovery. It supports two methods: via ADB or NVFlash. It detects the current partition layout and lists the suitable recovery images available for you to choose.
A) Change Recovery via ADB (rooted devices only). It is done with adb tool and dd command.
This works on both normal operation and recovery mode.
On normal operation the device must be rooted and USB debugging must be enabled.
Note: LG Driver package (or at least ADB drivers) must be installed at your PC for these to work.
B) Change Recovery with NVFlash. The recovery is flashed by NVFlash tool.
All latest available recovery images are located in ToolKitFiles\P990-imgs folder to be used by toolkit in any option needed. (or ToolKitFiles\SU660-imgs if SU660-AddOn package is installed).
1) The latest versions of cwm v5, v6 and twrp v2.6, for old BooLoader based ROMS prefixed as oldbl-
2) The modified cwm ones v5, v6 and twrp v2.6 for new BooLoader based ROMS prefixed as newbl-
Any procedure in toolkit, if needed, automatically detects the current partition layout, old or new and lists the suitable recoveries from imgs folder for you to choose.
Tip: You can add/remove/modify the recovery images yourself by copying/deleting/renaming them, in ToolKitFiles\<device>-imgs folder and just prefixing them as oldbl- or newbl- The toolkit will include them automatically. ​3 - Root a Stock ROM (with NVFlash method).
Roots a stock ROM with the method of NVFlashing a recovery of your choice and then installing SuperUser or SuperSU within recovery mode. This method always worked when other tools failed. ​4 - Repartition your device with preferred layout and bootloader:
ATTENTION!! This operation totally wipes your device's internal memory including internal SD-Card. Make sure you have a backup of your critical files, contacts, sms, etc.
It wipes internal memory, recreates partitions, and flashes the right bootloader and recovery image of your choice. You'll be able to boot in recovery mode only to install a new ROM or restore a previous nandroid-backup. It can be used for:
Quick switching to different partition layouts and bootloaders
Repairing a bricked device
It also offers a choice between pre-sized partition tables (for the selected layout and BL) to flash:
Stock [512MB System, 1536MB Data]
Double-Sized System [1024MB System, 2048MB Data] DualBoot Ready
Your own custom one (if you created one with option 9).
After repartition is finished you are prompted to:
a) Fix internal SD-Card automatically, because it is un-mountable after repartitioning.
b) Enable Dual-Boot (only if a DualBoot Ready partition table is selected).
For controling/maintaining Dual-Boot please refer to the DualBoot-Manual.pdf.
Note: LG Driver package (or at least ADB drivers) must be installed at your PC for these to work.
Safety keys: If any of the “SD-Card fix” or “Enable Dual-Boot” step fails go to ToolkitFiles\tools folder and run the IntSD-MountFix.cmd or DualBoot-Enable.cmd accordingly.
Attention: Both scripts are designed to run as standalone scripts also. The IntSD-MountFix.cmd is harmless but DualBoot-Enable.cmd always leaves system switched to ROM1 at the end, so use it ONLY if needed and ONLY on full-wiped data & boot partition e.g. after repartitioning.​5 - Extract LG KDZ and/or AP.bin file.
Use this to extract a downloaded kdz file to get the baseband (fls file) and/or the ROM (bin file) to flash with SmartFlash.
Additionally you may need to extract the bin file to separate the included partition images like chefs need to cook their new ROM. ​6 - LG Update Tool (Off-Line mode) to flash any KDZ ROM file.
It helps you flash any KDZ file, since the LG Update Tool does not allow a flash if the device is not in the current version LG expects. So we make our PC to serve LG update tool locally (offline).
The script automatically:
Adds 127.0.0.1 csmg.lgmobile.com entry (temporarily) in hosts file,
Sets the mini mongoose web server on the PC listening to port 9002 which serves the requests of the LG flash utility and run from wherever this package is extracted),
Installs MSXML needed for the tools to run
Runs all the utilities automatically for you (you only have to set to ON the windows enabler)
Opens in your web browser the instructions to follow and flash the ROM.
Finally it reverts back your hosts file, after closing the utility (R&D Test Tool), removing the above entry and stops http server and windows enabler.
7 - SmartFlash a Stock ROM and/or BaseBand.
It flashes a full Stock ROM (bin file) AND/OR Baseband (fls file) as I mention before in option 5.
For BaseBands information and downloads visit the detailed and helpful Complete Baseband overview thread by tonyp.
For official Stock ROMs (KDZ files) visit this site​8 - Replace Stock (locked) ICS BootLoader with the New un-locked one.
ONLY for devices already partitioned to ICS layout.
It detects the current partition layout and does not proceed if OLD layout found.
Needed for those who:
Installed Stock ICS with SmartFlash or LGUpdate
Flashed a ready-rooted system.img only and trying to flash a recovery image after
Have a P990 device but are still on the bootloader logoed with a white padlock, which does not enter SmartFlash mode.
9 - Create your own custom-sized partition table to flash with option 4.
It launches the Partitions Customizer GUI tool I created (see attached picture), to help you easily create your own custom-sized partition table to flash with option 4.
Attention!! DO NOT use it if you don’t know what and why you are doing it.​A – Get useful logs.
This option gets 4 different useful logs (Normal Logcat, Radio Logcat, Kernel and Last_kmsg) as very nicely described in this useful TonyP’s thread. All four commands are integrated in AIO-Toolkit for quick use without having to remember the commands. Thanks to TonyP.​I - Install APX (NVFlash Recovery) Drivers if not already installed.
It starts the windows device driver wizard to help you install the drivers needed for NVFlash. It detects your system OS and gives additional on-screen instructions needed if your PC is running Windows 8.
FYI: The drivers are located under ToolKitFiles\nvflash\driver folder.​Spanish Translation here by elxufas (Thank you)​Change Log
V6.0: Date 10 November 2013:
Evolved DualBoot-Control.zip v6.0:
It now supports two different sized system parts for ROM1 & ROM2 (not only two half) depending on total system size. You can also have a standard 512MB for one ROM and the rest for the other.
One zip for both P990 & SU660 devices (no more different zips for the two devices)
An option is added to re-join the previously split /system partition after enabling DualBoot.
Some bug fixes
New icons and short descriptions for each option added.
DualBoot-Enable.cmd (under ToolKitFiles\tools) is also updated to support different sized system parts too. This is called by Option 4 after repartitioning to enable Dual-Boot, when a DualBoot Ready layout is selected.
Small HTTP server (http.exe) which was used by option 6 for off-line LG update, has been substituted by mini web server mongoose, cause http.exe was considered infected by most Anti-Virus SW.
Prefixes ICS- and GB- of files and recovery images changed to newbl- and oldbl- accordingly, as these are commonly used at all XDA threads to declare the bootloader and partition layout. (SU660-AddOn package also updated to v6.0 with prefix changes).
New Update mechanism: When extracting toolkit-package into existing toolkit-folder, any previous manually added recovery image(s) will be kept and properly prefixed automatically (SU660 recoveries too). Recovery images are now reside under new folder named ToolKitFiles\<device>-imgs where <device> is P990 (or SU660 if SU660-AddOn package is installed).
You can now add more than 9 recovery images per layout. No more limits of nine (9) recovery images per layout. (That’s only because I don’t like limits, not because more than 9 recoveries exist )
TWRP Recovery images updated with TonyP’s latest v2.6.0.0 versions. Thanks TonyP
SuperSU install zip updated to latest version 1.65 (SU\SuperSU-v1.65.zip)
Some warning msgs added about adb drivers when they are gonna be needed.
Of course updated manuals to reflect new changes.
A HowTo.. Steps Guide (pdf) is included, to help (mostly new) users.
Older versions' changes:
V5.6: Date 03 June 2013:
SDCard can now be fixed if TWRP recovery is selected.
a typo corrected that caused the toolkit to close without any explanation after option 4 was completed.
V5.5: Date 07 May 2013:
New and more efficient DualBoot-Control.zip v5.5:
Dual-Boot is NO MORE dependent on the specific re-sized layout DualBoot-Control.zip auto-detects the system partition’s total size and splits it into two parts when enabling dual-boot. Note: If you create your own custom partition table (Option 9), the minimum system’s total size for enabling Dual-Boot is 1024MB.
It is noob-proof because it detects the current system part (ROM1 or ROM2) and gives only the appropriate options for maintaining Dual-Boot.
An additional option is added in its aroma menu, to switch ROMs within recovery (not only through SystemChangerX app in normal operation).
Improved and more detailed aroma GUI and more..
Same zip for both P900 & SU660 devices. (Till now a different file was included in SU660 add-on pack)
Option 4 renamed to: Repartition your device with preferred layout and bootloader
Optimized and updated to support Dual-Boot. Besides layout and bl you can now choose between a) stock, b) dual-boot ready partition table and c) your own created with option 9 (if you created one)
It fixes automatically the Internal SD-Card after repartitioning (if you select so when prompted). Necessary for devices with no external sdcard available. No more need to install the IntSD-MountFix.zip.
Simplified and clearer display messages to eliminate newbies’ confusion.
It also enables dual-boot (if you accept when prompted), if a dual-boot partition table is flashed and save you some steps and reboots from installation instructions.
Option A – Prepare device for Real Dual-Boot is removed. The existing Dual-Boot ready re-sized layouts are now available in Option 4.
Option 8 renamed to:Replace Stock (locked) ICS BootLoader with the New un-locked one to eliminate newbies’ confusion about its use.
TWRP Recovery images updated with TonyP’s latest v2.5.0.0. Thanks TonyP
New Option: A – Get useful Logs is now added in toolkit as requested by some of you. All commands described very nicely in TonyP’s thread are integrated in toolkit for quick use. Thank you TonyP.
Minor fix in backup/restore sd-card: When canceling it didn’t return correctly.
ADB tool updated to latest 1.0.31
V5.0: Date 08 Feb 2013:
Toolkit is now modular: It can support theoretically more LG devices with AddOn packages. An AddOn package for SU660 is already implemented.
Option: A – Prepare device for Dual-Boot is added to repartition the device for Dual-Boot support. Attention: DualBoot uses a spesific partition table, so if you are on dual-boot you cannot resize partitions because it will mess-up the device.
Changing recovery via adb now also works when device is into recovery (not only on normal operation) and gives the option to boot into the newly flashed recovery right after.
In option 8 is now clearly mentioned that it is not needed if option 4 has been used, It is needed only if the device is still on Stock locked bootloader. A lot of people still think that they have to use option 8 every time they change to ICS partition layout. Option 4 had always been flashing the un-locked ICS bootloader when changing to ICS partition.
After repartitioning the device enters recovery automatically when powered on. No need to keep pressing Vol- & Pwr.
For OLD BL only the extended (512MB system) partition table is included, to support up-coming new ROMs. If someone wants the stock 350MB he can always make one with PartitionResizer.
Only one of the latest v5, v6 & twrp v2.4 recovery versions is now included for each bootloader to reduce the package size. It will not remove the existing recoveries if extracted into the same folder. Remember that any other recovery image wanted can be added manually as always. (Thanks to Tonyp for his modified twrp v2.4 for the new bl)
Fixed: Extracting kdz under WinXP not working. It was due to different behavior of Microsoft expand.exe on WinXP than on Win7,8 (it doesn't accept wildcards as input file).
Toolkit now checks its write permissions in the folder extracted and gives a warning.
Updated IntSD-MountFix.zip & System-ReFormat-ext4.zip to work on both P990 and SU660 devices independently of the partition layout and bootloader.
SuperSU install zip updated to install latest v1.04 version.
V4.0: Date 05 Jan 2013:
Includes the fix for the options 1 & 5 not starting under certain circumstances.
Off-Line LG-Update Instructions now converted to html and will be opened on your default browser. (NO doc file, NO need to be associated to some application like office to open). It also has an info page of its own too.
More checking and error handling. Now checks (where possible) prerequisites and errors and gives possible reasons and solutions. It is important at least to prevent showing that an operation finished successfully while it didn't. I had to use other mechanisms to do that since some tools don’t return error codes.
KDZ extractor will stop if file is corrupted
BIN extractor will also check if images extracted successfully.
Off-Line LG Update will check if http.exe is not blocked by AV S/W and if the hosts file is modified successfully.
NVFlash Restore checks the sizes of current partitions and the backed up images and aborts restore if a partition is smaller than its image or warns if larger. It is needed because anyone now can resize the partitions easily with option 9. Note!! Smaller images can be restored to larger partitions but the final usable size will be the image’s one.
Completed instructions for flashing a recovery image via ADB successfully on CM10 ROMs too.
Minor changes in displayed messages.
V3.6: Date 01 Jan 2013:
Fixes the nvflash configuration file error: file not found In option 4, which happens if error occurs and user presses any key to retry.
V3.5: Date 30 Dec 2012
Option 1 changed to Backup/Restore options and now (additionally to SDCard backup/restore) includes NVFlash Backup/Restore of full ROM (boot, system, data), ROM only or Data only.
Option 2 changed to Change your Recovery Image and have two options (to select the method)
1 - Change Recovery via ADB (rooted devices only). It now works in CM ROMs too
2 - Change Recovery with NVFlash
The new versions of intSD-MountFix.zip and System-ReFormat-ext4.zip (already attached in OP) now included in toolkit
IntSD-MountFix.zip now works on both layouts and fixes SD only if needed to avoid formatting wrong partition when flashed by mistake.
System-ReFormat-ext4.zip now works on both layouts too.
More detailed information On-Screen for newbies by just pressing H when prompted.
ics-partitions.cfg file for nvflash has the ext3 FS-fix for the MSC partition (thanks pengus77 for your advice).
New ICS recovery 6.0.2.5 by pengus77 is now included. (Thanks pengus77).
Install APX Drivers now as new option (I) in main menu with on-screen instructions for win8 users. (In gray color cause it's an one time action and needed only if drivers are not already installed).
The AIO-Toolkit now zipped as self-extracted exe. It can be extracted over a previous version also, because now any un-needed previous files will be removed automatically. Also creates a shortcut in your desktop for quick access.
V3.0: Date 23 Dec 2012
A new tool “PartitionCustomizer.exe”added with option 9 to help you easily create a re-sized partition table to flash with option 4.
Windows 8 users won’t be asked anymore to install MS .Net Framework 3.5.
Toolkit now checks your windows version and uses system’s choice.exe in Vista,Win7& Win8. In WinXP systems it will use the alternate Choice.exe (under ToolKitFiles\tools, renamed to Choice4XP.exe.
CMxx_IntSD-Mount-Fix_AfterRepartitioning.zip added in CWM folder. Install this in recovery mode after repartitioning and installing a CMxx based ROM.
Install-APX-Drivers.cmd script is added in ToolKitFiles\nvflash\driver. It installs APX drivers without having to plug the phone first (in nvflash mode pressing vol- & vol+)
All instructions and help of OP now Included in pack as a pdf document for quick help. I will keep working on it to make it a full manual and guide.
V2.0: Date 16 Dec 2012
Two more options added.
SmartFlash a Stock ROM and/or Baseband (Completing this way the toolkit’s name “All-In-One”)
Flash New Un-Locked ICS Bootloader.
Added more safeties (like automatic detection of partition layout) and warnings to prevent wrong choices.
Added a cwm-flashable SuperSU-v0.99.zip inSU folder also for those who prefer it instead of SuperUser. Every zip can be flashed over an already installed SU or SuperSU. Removes previous occurrences of these.
Added two flashable zips in CWM folder for re-formating system partition in ext4 in case nandroid restore fails after repartioning.
Simplified/shorter instructions for the automatic off-line LG Update Tool
2nd minor fix in BIN extractor occurring sometimes when drag/drop a folder or file. Thanks to SuperSkill for discovering the bug.
Bugfix of not backing-up files with no extension from internal SD-card.
DPInst32.exe& DPInst64.exe files have been added under ToolKitFiles\nvflash\driver. Run one depending on your windows platform (x86, x64) to install APX drivers easier if needed.
An extra Addon pack available for fixing the not mounting interal sd-card bug in CMxx ROMs.
V1.1: Date 2 Dec 2012 Fixes a weird bug in BIN Extractor, when the full pathname of the BIN file contains parenthesis ( ) either in a parent folder or the name itself.
V1.0: Date 29 Nov 2012 First version uploaded.
​Credits
rmein & Stefan for the idea and parts of their scripts I integrate
wkpark for the modified cwm v5.0.2.8e the BIN extractor and of course for Unlocking the ICS Bootloader, Big thanks to him. Without him we would have no ICS development.
Tonyp For: baseband instructions, his modified twrp recovery for new BL and adb commands for getting logs.
pengus77 for his custom v6.0.2.5 cwm image
Rusty! for cwm 5.0.2.8 (internal – external)
Stefan again for modified v6.0.1.5 cwm image
homero2 for part of his script in bin extractor.
unknown_world for his original instructions how to officially update in off-line mode.
ProgMaq: For his Full Brick Repair tool that helped with CMxx mount bug.
jes0411 for his original script for P970 to extract KDZ files.
navossoc and XDA team for creating LGExtract tool
thomas_polaert for his colorizing echo (cecho.exe)​General Info: How to install unsigned drivers in Windows 8.
For APX Drivers needed for NVFlash operations, use Option I.
For any other unsigned drivers needed, this is the way to install them:
Move your mouse to Right down Corner.
Click Settings (gear icon)
Click Change PC Settings
Click General (On right panel of the screen) under Advanced startup
Click Restart now
OR
Easiest way for the above: Hit WinKey + R, type in the following command and hit enter:
shutdown -o -r -t 0
--------------------
Wait for next menu..
Click Troubleshoot.
Click Advanced Options
Click Startup Settings
Click Restart.
Wait to reboot. It will come back with boot menu with many options
Press the number of the Disable driver signature enforcement
Windows will boot normally.Now install the drivers you want.
Note:After your next reboot the enforcement gets enabled again.
​
thanks for sharing
Oh nice. thats hell lot of options. will try sometimes this weekend. Thanks a lot for your work. P990 is unbrickable phone and many nvflash builds available, so not afraid of trying anything these days. lolz.
Thank You! This toolkit is very useful! From new ics layout back to GB layout smartflashing 28G baseband was easy!
Thanks...
Looks to be very promising, Thanks, will try it.
Nice work indeed!
I love the fact that there's still fresh development on this old phone
But I don't think I should appear in the credits for providing CWM 6.0.1.5 touch.
I just dowloaded the official build from here: http://www.clockworkmod.com/rommanager
For removing me you could highlight wkpark a little more, especially for cracking the new bootloader.
Without him there wouldn't be any CWM with the new bootloader.
What was the data size? 1.5GB? Can u make a size of 744 for the system? Tks alots....
tonyp said:
Nice work indeed!
I love the fact that there's still fresh development on this old phone
But I don't think I should appear in the credits for providing CWM 6.0.1.5 touch.
I just dowloaded the official build from here: http://www.clockworkmod.com/rommanager
For removing me you could highlight wkpark a little more, especially for cracking the new bootloader.
Without him there wouldn't be any CWM with the new bootloader.
Click to expand...
Click to collapse
Thank you,
You are right about wkpark and the bootloader I forgot the new bootloader completely.
I will correct it.
@wkpark sorry,
cmahendra said:
Oh nice. thats hell lot of options. will try sometimes this weekend. Thanks a lot for your work. P990 is unbrickable phone and many nvflash builds available, so not afraid of trying anything these days. lolz.
Click to expand...
Click to collapse
Glad you found this to be true in your case Been struggling with a bricked P990 for a few days now that errs out when nvflash tries to flash a new bootloader. Will definitely try this tool when I get home tonight and see what I find. Crossing my fingers here
[EDIT] No dice. Still bricked. Happy for any input here; I'm clueless at this point. Seems I've tried everything the internet can suggest. Can't even read the partition table from my phone; can't download bootloader; always errors. Full info at http://forum.xda-developers.com/showpost.php?p=34754117&postcount=38 [/EDIT]
orbital_71 said:
What was the data size? 1.5GB? Can u make a size of 744 for the system? Tks alots....
Click to expand...
Click to collapse
Noted.
Maybe in next version I will include different system sizes for the user to select.
But for now you can always edit the .cfg file (gb-large.cfg or ics-partitions.cfg) under ToolKitFiles\nvflash folder.
Search for the partition named APP and change its size to 780140544 (744*1024*1024).
Note: This is enough for old layout (gb-large.cfg). For ICS one (ICS-partition.cfg) since all partitions are sized (in contrary with OLD layout that UDB partition is set to 0xFFFFFFFFFFFFFFFF which means all the rest) you have to reduce UDB size (internal SD) by the additional size you added in APP partition.
So for this example you have to reduce UDB by (744-512)*1024*1024 = 243269632.
Have in mind that you are not gonna have this system size available if you flash one of the current ICS NVFlash ROMs because their system.img is 512MB.
The whole 744 size will be avalable only with ROMS that are flashed with CWM zips, which don't have a system.img inside but a system folder.
OR
After you flash an nvflash ROM make a nandroid backup, resize the partitions and restore the backup (I haven't tried it but it should work)
can you add the bootloader install?! old and ne, may be useful after flash ics via smart flash ie
solrakk6 said:
can you add the bootloader install?! old and ne, may be useful after flash ics via smart flash ie
Click to expand...
Click to collapse
I am not sure I understood.
Which new and old? You mean the GB and the ICS one or the ICS locked and unlocked one?
The new unlocked one is usefull in case you want to be able to boot in a cwm recovery and it is flashed in rooting option along with the recovery of your choice.
What would be the reason to flash only the bootloader.
Great tool, but is it only me who can't extract the bin file? Thanks
Sent from the new smoothly LGP990
I just uploaded an update v.1.1
It fixes a weird bug in BIN Extractor that it's not working, when the full pathname of the BIN file contains parenthesis ( ) either in a parent folder or the name itself.
If you already have downloaded the v1.0 just download the updated-script attached in post.
EDIT: It is a batch scripting bug.
I had used conditional “IF something DO (….) ELSE (….)” in BIN extracting script, to extract all partitions or just one. A BIN file’s pathname with parenthesis breaked the IF ELSE condition. Batch just s***ks
spyrosk said:
I just uploaded an update v.1.1
It fixes a weird bug in BIN Extractor that it's not working, when the full pathname of the BIN file contains parenthesis ( ) either in a parent folder or the name itself.
If you already have downloaded the v1.0 just download the updated-script attached in post.
Click to expand...
Click to collapse
I got it working last night, so this is my reply, I got another output on the bin file
Thanks for updating
Sent from the new smoothly LGP990
Internal SD
Hey, I really like your ToolKit. I've been messing around with it, but I have one problem (not sure whether it lies in your ToolKit or me being stupid). After I flashed to a rooted ICS leak a few days ago, I wanted to revert back to CM10 (to check out the in-call-bug fix). Now, it seemed to me that your toolkit would come in handy to revert back to the old bootloader and partition layout. At first i was messing around with CWM: I couldn't mount my SD to flash a CM.zip. It seems that only the older CWM version (1st option in your menu) lets me mount the SD. Ok, so I was able to mount my micro-SD again and I flashed the rom, gapps and the fix. After booting, my phone didnt recognize my internal nor external SD; after connecting to USB, my computer only showed my micro-SD, but when I entered it, it seemed empty. The internal storage isn't recognized by my computer at all. I tried some other tools to flash a few different roms but I ended up reverting back to the ICS-leak I was using in the first place: then both the internal and external storage were recognized again (with no loss of data on the micro-sd).
Well, I'm no developer at all but I read some things about formatting the internal storage; could it be that, after repartitioning, your tool doesn't format my internal storage partition and that this causes mounting problems? I tried formatting it manually through ADB, but it didn't work (probably because my ADB/linux s*ck).
Maybe you have any idea to help me out here Thanks in advance
Thank you for this great tool!
ValentineCrow said:
Hey, I really like your ToolKit. I've been messing around with it, but I have one problem (not sure whether it lies in your ToolKit or me being stupid). After I flashed to a rooted ICS leak a few days ago, I wanted to revert back to CM10 (to check out the in-call-bug fix). Now, it seemed to me that your toolkit would come in handy to revert back to the old bootloader and partition layout. At first i was messing around with CWM: I couldn't mount my SD to flash a CM.zip. It seems that only the older CWM version (1st option in your menu) lets me mount the SD. Ok, so I was able to mount my micro-SD again and I flashed the rom, gapps and the fix. After booting, my phone didnt recognize my internal nor external SD; after connecting to USB, my computer only showed my micro-SD, but when I entered it, it seemed empty. The internal storage isn't recognized by my computer at all. I tried some other tools to flash a few different roms but I ended up reverting back to the ICS-leak I was using in the first place: then both the internal and external storage were recognized again (with no loss of data on the micro-sd).
Well, I'm no developer at all but I read some things about formatting the internal storage; could it be that, after repartitioning, your tool doesn't format my internal storage partition and that this causes mounting problems? I tried formatting it manually through ADB, but it didn't work (probably because my ADB/linux s*ck).
Maybe you have any idea to help me out here Thanks in advance
Click to expand...
Click to collapse
your tool doesn't format my internal storage partition and that this causes mounting problems?
Click to expand...
Click to collapse
Repartitoning uses nvflash to recreate all partitions again and nvflash wipes all partitions including internal SD for sure.
At first i was messing around with CWM: I couldn't mount my SD to flash a CM.zip. It seems that only the older CWM version (1st option in your menu) lets me mount the SD
Click to expand...
Click to collapse
where your CM.zip was? In external or Internal SD? 1st option should be the cwm-5.0.2.8-ext.img. That recovery mounts the external SD by default.
Could you give me more details of what exactly you did step by step? Somewhere I lost you.
1) you repartioned to old layout
2) which cwm did you choose?
3) Your CM.zip should be in your external SD because internal would be wiped.
I would also suggest that if you have a nandroid backup of a previous CM ROM try to restore it first, make sure that everything is working as it should and then flash the newer CM you want. Maybe the problem with SD cards is in the ROM you are trying to flash.
Please let me know
can i root the 30A with the root toolkit option??!
---------- Post added at 08:45 PM ---------- Previous post was at 08:28 PM ----------
spyrosk said:
I am not sure I understood.
Which new and old? You mean the GB and the ICS one or the ICS locked and unlocked one?
The new unlocked one is usefull in case you want to be able to boot in a cwm recovery and it is flashed in rooting option along with the recovery of your choice.
What would be the reason to flash only the bootloader.
Click to expand...
Click to collapse
exactly
solrakk6 said:
can i root the 30A with the root toolkit option??!
---------- Post added at 08:45 PM ---------- Previous post was at 08:28 PM ----------
exactly
Click to expand...
Click to collapse
I tested it with V28G and it worked. It should work with 30A also

[TOOL] NEW <<--->> OLD Bootloader ROM Converter v1.0

P990 ROM Converter
from New BootLoader to Old and vice versa​
Actually this tool is Tonyp’s idea. All credits to him.
He asked me if I am interested in making a script and automating the rom porting from one bootloader to the other and he assisted me with all the changes that need to be done.
Due to different EOL (end of line) termination in text files between UNIX-Linux (LF) and windows (CRLF), I had to make bash (linux) scripts necessarily. The good thing is that the tool can be used in both windows and linux systems.​Installation:
Download and extract the attached ROM-Converter-tools.zip package anywhere you like.
Download and extract in the same folder, a newer ROM-Converter-scripts.zip if exists.
For Windows systems only:
Install Cygwin following the instructions below:
Download setup-x86.exe from here http://cygwin.com/install.html
Attention!! Even if you are running x64 windows system install the x86 version. DO NOT install the x64 cygwin version because two binaries (mkbootfs.exe & mkbootimg.exe used to pack boot.img do not work properly).
Run the setup-x86.exe, when the list of packages is shown make sure you add the following:
Expand Archive and select zip & unzip to be installed
Expand Utils and select cpio to be installed
Expand Perl and select ‘perl: Larry Wall’s Practical..’ and perl_vendor to be installed
(If you are already using cygwin run setup again and add the above packages to be installed.)
For Linux systems only:
Download the attached linux-mkboot-binaries.zip (mkbootfs, mkbootimg), extract them in tool folder and remove the windows ones (mkbootfs.exe, mkbootimg.exe).​How to use it:
Put the source ROM.zip(s) in the 'source_zips' folder (otherwise you’ll be prompted to drag n’ drop it in terminal)
Open Cygwin. Type cd (leave a space after cd) and type /cygdrive/c/dir1/dir2/../ROM-Converter-tools
where “c/dir1/dir2/../ROM-Converter-tools” is the full path of the folder you extracted the convert-tool package (e.g C:\dir1\dir2\..\ROM-Converter-tools) and press enter.
In case of long pathname, instead of typing the whole of it, use one of the following tips to easily change to tool's path.
Tip#1: After you type cd , drag n’ drop from windows explorer into cygwin terminal, the folder "ROM-Converter-tools" and it wiil automatically be converted to ‘/cygdrive/c/dir1/dir2/../ROM-Converter-tools’ press enter and that’s it.
Tip#2: After cd /cygdrive/c/ type the 1st one or two letters of the next subdir and autocomplete it's name with TAB.
Type one of these commands in cygwin terminal:
Code:
./convert_rom.sh -stepmode #--> starts in step-mode for debugging purposes
./convert_rom.sh #--> runs unattended (with no pauses).
​What it does:
The scripts use as input the 'files2convert.txt' which contains all possible files needed to be converted.
This is for compatibility purposes to support as many roms as possible and for future changes.
files2convert.txt
Code:
/ramdisk/fstab.star
/ramdisk/fstab.p990
/ramdisk/init.cm.rc
/ramdisk/init.cm-star.rc
/ramdisk/init.star.rc
/system/etc/vold.fstab
/system/bin/setup-recovery
/system/bin/check_sdcard.sh
/META-INF/com/google/android/updater-script
More files can easily be added for conversion if needed.
The converter:
Extracts source ROM zip
Unpacks the boot.img
Reads the above files, replacing partitions' mount points, among some othe things, for the selected bootloader
Replaces the kernel image for the selected bootloader
Builds new boot.img
Creates new converted ROM zip
Under 'kernels' folder there are already included the two latest Kowalski kernel images (zImage) for old & new BL and its modules.
You can add more kernels and you’ll be prompted to choose the desired one when converting a ROM (if more than one is found ).
Read how to do this:
kernels folder contains all kernel images (zImage), kernel modules and any other file the kernel needs.
for each kernel there are:
file(s) named: prefix-KernelName[-ver].zImage
folder(s) named: [prefix-]KernelName[-ver]Kernel
where:
prefix must be oldbl or newbl (depending on which bootloader this kernel is for.
KernelName[-ver] is whatever you like [and optionaly its version].
zImage is the extension of the kernel image.
How to maintain kernels folder
A. Update existing kernels
Download the desired kernel package and open it.
Replace its kernel zIamge in kernels folder
Extract its modules and any other file needed and replace all existing ones
B. Add kernels
Download the kernel package and open it.
Find the zImage inside package and extract it into kernels
Rename it this format: prefix-KernelName[-ver].zImage
Create a folder named: prefix-KernelName[-ver]. It will be used to keep kernel's modules and other files needed. If this kernel is released for both bootloaders and its modules are identicaly on both bootloaders (like the existing kowalski one) then name the folder only KernelName[-ver] (without prefix).
Inside this [prefix-]KernelName[-ver] folder create a subdir tree lib\modules
Extract in lib\modules all kernel's modules from kernel package.
If any other file is needed by kernel then create it's subdir tree (assuming that [prefix-]KernelName is the system folder of the kernel package) and extract it there.
Attention: Current version will hopefully work on CM-based ROMs.
Stock based ROMs need more files to be changed, but they are not included yet, because I don't have the whole info needed.
Hopefully @rugglez or someone else will be willing to help.
Till then avoid converting stock-based roms, (or if you do try, then after converting replace the boot.img in converted rom and "system/lib/modules/*" at least with a working boot.img and modules from another stock-based rom, for this bootloader of course. This could work but I am not the expert to say)​
ChangeLog:
Version 1.0 Aug 23, 2013
- The two convert2xxx_bl.sh scripts are now integrated into one script convert_rom.sh.
- The new convert_rom.sh also accepts an optional switch [-stepmode].
Code:
./convert_rom.sh -stepmode #--> starts in step-mode for debugging purposes
./convert_rom.sh #--> runs unattended (with no pauses).
- A technique added to preserve whitespaces in converted lines. So converted files keep margins and whitespaces of the source ones.
- Script checks whether source rom is a newbl or an oldbl one, displays an error message if rom is not for the expected bootloader and exits.
Version 0.3b Aug 23, 2013
-a typo fixed in converting scripts
Version 0.2b Aug 23, 2013
-liblgeril.so is also replaced with the one for the oldbl or newbl accordingly.
-A forced removal (switch -f) added when removing files and dirs just in case.
-Converted ROM name will be built automatically from the source name suffixed by -oldbl or -newbl accordingly. (If source rom's name contains 'newbl' or 'oldbl' it will be substituted by 'oldbl' or 'newbl' accordingly)
-Converted ROMs are now created under 'converted_roms' folder.
-Converting to oldbl: Files 'check_sdcard.sh' and 'lgdrm.img' are being removed if exist (as they are not used)
-Converting to newbl: Charger dependent images are also copied in ramdisk (not only the charger binary).
-Kernel modules will also be replaced with the ones coming with specific kernel image.
-Kowalski Kernel images & modules, in kernels folder, are replaced with latest ones dated:2013072013. (it was my fault, the previous ones were downloaded from "releases" download folder and were dated 20230303)
-Some changes in display messages.
Version 0.1b Aug 19, 2013
-1st beta version​
I really don't want to have all of the credits.
While it's been my idea to create such a script and I provided the input on what needs to be changed by the script, I couldn't have done it on my own.
I both lack the skills(!) and time.
Steve would say:
Anyways, don't leech. If this helps someone, donations are appreciated:
Donate to spyrosk
Donate to me​
spyrosk said:
To convert a new-bl rom to an old-bl rom: Type ./convert2old_bl.sh
To convert an old-bl rom to a new-bl rom: Type ./ convert2new_bl.sh
​
Click to expand...
Click to collapse
Thanks Android tool guru @spyrosk....and thanks @tonyp
just trying it out. A small comment....people might mistake this....there is no space between the / AND convert2new_bl.sh command line....should be the same with oldbl.sh command....isnt it?
thought of giving a feedback about this.
thanks once again
EDIT: battery charge script cannot be opened error....and cannot be removed error....
Creating new ROM zip ... zip warning: Permission denied
zip warning: Permission denied
something went wrong please zip contents in rom folder manually
done.
SREEPRAJAY said:
Thanks Android tool guru @spyrosk....and thanks @tonyp
just trying it out. A small comment....people might mistake this....there is no space between the / AND convert2new_bl.sh command line....should be the same with oldbl.sh command....isnt it?
thought of giving a feedback about this.
thanks once again
EDIT: battery charge script cannot be opened error....and cannot be removed error....
Creating new ROM zip ... zip warning: Permission denied
zip warning: Permission denied
something went wrong please zip contents in rom folder manually
done.
Click to expand...
Click to collapse
Hi my friend,
First of all sorry again for deleted post(s)..
and thank you.
The "typo" is corrected. Actually it was not a typo but I have noticed that it happens when pasting text from another editor.
Which ROM did you try to convert?
battery charge script cannot be opened error??? On which step did it happen?
I don't try to open any battery charge script
Did you add any file in "files2convert.txt"?
Very interesting tool.
Last july 7th I asked you if this were possibile and didn't have any reply. Now I'm happy that Tonyp convinced you.
Sent from my LG-P990 using xda app-developers app
wals46 said:
Very interesting tool.
Last july 7th I asked you if this were possibile and didn't have any reply. Now I'm happy that Tonyp convinced you.
Sent from my LG-P990 using xda app-developers app
Click to expand...
Click to collapse
I was on vacation sorry and when I came back I forgot to reply.
By that time I couldn't tell for sure anyway, before I have the total "picture" of the work that must be done, I mean.
@spyrosk,
my friend
Which ROM did you try to convert? Latest Avatar 3.1 Nightly OLD to NEW BL
battery charge script cannot be opened error??? On which step did it happen?I don't try to open any battery charge script It happened just the step before making the new ROM Zip
Did you add any file in "files2convert.txt"? NO
Nevertheless, I will try to flash the ROM and see what happens
EDIT:
Just now, I tried to do the PAC Man by Metallica for the Old BL and had the same error of battery charge script....
Same in Django Adios Amigo 1.6.5 to OldBL....see the script error below:
STEP 2: EXTRACTING BOOT.IMG ...
Press [enter] when ready
rm: remove write-protected regular file `out/ramdisk/charger'?
rm: cannot remove `out/ramdisk': Directory not empty
mkdir: cannot create directory `out': File exists
STEP 5: PACKING NEW BOOT.IMG ...
Press [enter] when ready
Selected kernel: kernels/oldbl-Kowalski-126.zImage
Using base address 0x10000000
Using command line ''
error: cannot open './ramdisk/charger' for read
rm: remove write-protected regular file `out/ramdisk/charger'?
rm: cannot remove `out/ramdisk': Directory not empty
Hope this helps in checking....
SREEPRAJAY said:
@spyrosk,
my friend
Which ROM did you try to convert? Latest Avatar 3.1 Nightly OLD to NEW BL
battery charge script cannot be opened error??? On which step did it happen?I don't try to open any battery charge script It happened just the step before making the new ROM Zip
Did you add any file in "files2convert.txt"? NO
Nevertheless, I will try to flash the ROM and see what happens
EDIT:
Just now, I tried to do the PAC Man by Metallica for the Old BL and had the same error of battery charge script....
Same in Django Adios Amigo 1.6.5 to OldBL....see the script error below:
STEP 2: EXTRACTING BOOT.IMG ...
Press [enter] when ready
rm: remove write-protected regular file `out/ramdisk/charger'?
rm: cannot remove `out/ramdisk': Directory not empty
mkdir: cannot create directory `out': File exists
STEP 5: PACKING NEW BOOT.IMG ...
Press [enter] when ready
Selected kernel: kernels/oldbl-Kowalski-126.zImage
Using base address 0x10000000
Using command line ''
error: cannot open './ramdisk/charger' for read
rm: remove write-protected regular file `out/ramdisk/charger'?
rm: cannot remove `out/ramdisk': Directory not empty
Hope this helps in checking....
Click to expand...
Click to collapse
I just converted Avatar-3.1 from old to new. No errors at all.
I don't like the write-protected error: rm: remove write-protected regular file `out/ramdisk/charger'
So it tries after that to remove the out directory but of course it's not empty.
Well,
Remove out directory manually and try again from the beginning..
After step 5, Before you continue to next step try to remove the whole out directory manually again.
Try also to give your account full control to the converter's folder.
This problem seems to he a windows security permission issue. Are you an administrator on the system you use?
-------------------------------------------------------------------
Stock based ROMs need more files to be changed, but they are not included yet, because I don't have the whole info needed.
Hope @rugglez or someone else will be willing to help.
Till then avoid converting stock-based roms,( or after converting replace the boot.img in converted rom with a working boot.img from another stock-based rom for the same bootloader of course. This may work)
Try ONLY CM-based roms.
I forgot to write it in OP. I'll do it asap.
spyrosk said:
I just converted Avatar-3.1 from old to new. No errors at all.
I don't like the write-protected error: rm: remove write-protected regular file `out/ramdisk/charger'
So it tries after that to remove the out directory but of course it's not empty.
Well,
Remove out directory manually and try again from the beginning..
After step 5, Before you continue to next step try to remove the whole out directory manually again.
Try also to give your account full control to the converter's folder.
This problem seems to he a windows security permission issue. Are you an administrator on the system you use?
-------------------------------------------------------------------
Stock based ROMs need more files to be changed, but they are not included yet, because I don't have the whole info needed.
Hope @rugglez or someone else will be willing to help.
Till then avoid converting stock-based roms,( or after converting replace the boot.img in converted rom with a working boot.img from another stock-based rom for the same bootloader of course. This may work)
Try ONLY CM-based roms.
I forgot to write it in OP. I'll do it asap.
Click to expand...
Click to collapse
I have a list of files/folders which I was using to port...Thanks to @rugglez ofcourse...
If you have seen the dev section....I was porting a few ROMs from Old to New BL including the stock ROMs.
So, I will send you the list by PM.
I will try the CM based ones with manual clearing...and will check that
EDIT: I am the administrator...so normally only one account and I have that rights too
thanks once again
Okay, I just used the converter on Win8 x64 to create an oldbl version of my CM10.2 ROM.
I have uploaded the resulting zip here: http://tonyp.basketbuild.com/index.php?dir=main/CM-10.2/oldbl-untested-builds/
It is untested - so do a backup!
I will post the steps I took, this might help some people who never worked with tools like this.
Please try it out with different ROMs - and if the resulting zips work a) post that here and b) share the zip in the respective threads for others to use
If you have any erros post the complete cygwin output here.
To get it do a right-click into the cygwin window, then press Enter - it's now copied into the clipboard!
Okay, off we go:
Preparation (one time only):
Downloaded cygwin. and install it
The path C:/cygwin is perfecly fine.
Just press Next until you get to the paket selection, then use the searchbox to quickly get to the tools needed:
(just click once on it, the first checkbox will get checked. The second one is for the sourcecode, you don't need that).
- zip (Archive)
- unzip (Archive)
- cpio (Utils)
- perl: Larry Wall’s Practical (perl) (you might have to open "perl" and look for it manually)
- perl_vendor (perl)
Downlaod the zip attached at the OP, extract it.
I extracted it to C:/temp/ROM-Converter-tools/
done
ROM conversion:
Open the Cygwin Terminal (either in the start menu or execute the Cygwin.bat at C:/cygwin/)
Put the ROM zip into the source_zips folder
Type:
Code:
cd /cygdrive/c/temp/ROM-Converter-tools
Needs to get adapted to your path if you extracted the ROM-Converter-tools somewhere else.
My path is: C:/temp/ROM-Converter-tools/
(Hint: after /cygdrive/c/ autocompletion with TAB will work!)
I didn't try the drag&drop tip of spyrosk.
Type:
Code:
./convert2old_bl.sh
(or convert2new_bl of course if you're going the other direction)
Follow the instructions on the screen,
As it's still in the debug mode you need to press [enter] a couple times.
This will change in the future.
Done, your converted ROM will be in the out_oldbl or out_newbl folder.
do this tool work with CM7
tonyp said:
Okay, I just used the converter on Win8 x64 to create an oldbl version of my CM10.2 ROM.
I have uploaded the resulting zip here: http://tonyp.basketbuild.com/index.php?dir=main/CM-10.2/oldbl-untested-builds/
It is untested - so do a backup!
[/LIST]
Click to expand...
Click to collapse
uhm ... in my case it got stuck at CM booting logo ... is flashing it recovery sensitive?
spyrosk said:
"...I just converted Avatar-3.1 from old to new. No errors at all.
I don't like the write-protected error: rm: remove write-protected regular file `out/ramdisk/charger'
So it tries after that to remove the out directory but of course it's not empty.
Well,
Remove out directory manually and try again from the beginning..
After step 5, Before you continue to next step try to remove the whole out directory manually again..."
Click to expand...
Click to collapse
Hummmmm, I tried experimenting, and it happened to me the same as the partner "SREEPRAJAY"! ...
Here are the errors I had during the experiments (three files *. pdf);
Hrmph.
Was running the latest CM 10.1 nightly. Rooted, old bootloader, CWM Recovery 6.0.3.1.
Made a Nandroid backup. Wiped everything from recovery, factory reset, flashed this :
http://tonyp.basketbuild.com/download.php?file=main/CM-10.2/cm-10.2-20130821-UNOFFICIAL-p990.zip
According to CWM all flashed and well. I rebooted.
Phone's bricked, won't even boot to recovery, gets stuck in the LG logo. Ouch. Halp ?
Ultramanoid said:
Hrmph.
Was running the latest CM 10.1 nightly. Rooted, old bootloader, CWM Recovery 6.0.3.1...flashed this :
http://tonyp.basketbuild.com/download.php?file=main/CM-10.2/cm-10.2-20130821-UNOFFICIAL-p990.zip
Click to expand...
Click to collapse
But...that ROM is for NEW BootLoader!!!...
Use All-In-One Toolkit to reattach the situation (reinstall again CWM Recovery);
http://forum.xda-developers.com/showpost.php?p=34809475&postcount=1
trocopassu said:
But...that ROM is for NEW BootLoader!!!...
Use All-In-One Toolkit to reattach the situation (reinstall again CWM Recovery);
http://forum.xda-developers.com/showpost.php?p=34809475&postcount=1
Click to expand...
Click to collapse
I know ! ( NEVER flash anything as soon as you wake up without checking twice, kids. )
I saw the one for old bootloader for the 20th, moved up a directory, happily flashed the one for the 21th... and for the NEW bootloader.
Don't have access to a laptop to tinker and won't for a few days. Sigh.
millionsun93 said:
do this tool work with CM7
Click to expand...
Click to collapse
No, and it never will.
GB relies on the old bootloader. It would be a lot of work to make it compatible, which isn't worth the trouble at all.
flat__line said:
uhm ... in my case it got stuck at CM booting logo ... is flashing it recovery sensitive?
Click to expand...
Click to collapse
Ah that's a shame. spyrosk needs to have a look at that when he gets some free time.
You did a full wipe didn't you?
If you did it sound like an error in the fstab.
Ultramanoid said:
I know ! ( NEVER flash anything as soon as you wake up without checking twice, kids. )
I saw the one for old bootloader for the 20th, moved up a directory, happily flashed the one for the 21th... and for the NEW bootloader.
Don't have access to a laptop to tinker and won't for a few days. Sigh.
Click to expand...
Click to collapse
Your partitions are borked and you will have to use nvflash.
I'm sorry about that although I don't really know how you came to the idea to try the untested oldbl builds when you got no PC around to recover.
This could have even happened with the correct rom - again, it is completely untested.
Sent from my LG-P990 using Tapatalk 4
  
tonyp said:
Ah that's a shame. spyrosk needs to have a look at that when he gets some free time.
You did a full wipe didn't you?
If you did it sound like an error in the fstab.
Click to expand...
Click to collapse
I did the full wipe (I checked: I used the ext4 full wipe zip by dr4go for the old bootloader, as I usually do, using CWM 5.0.2.8)

[UB]FOTA TWRP/PhilZ installer APK and Flashable ZIP recovery

F2FS improves the benchmark score in most (if not all) devices by around 20%..
For testing:
I have modified an APK containing Aroma Installer to flash recoveries to fotakernel for our ZR's. This is an initial release..
It contains 2 recoveries.
PhilZ Touch and TWRP with f2fs (TWRP) support which has been tested and working in both Resurrection and Validus builds/ports and should work in all cm11 and CM12/CM12.1 with f2fs working in cm12 after march this year
Install the apk and flash either Philz or Twrp through the app in the drawer..
And no, this is not Xperia Recovery manager.
The recoveries are both contained in the app so making it 22MB to download.
The TWRP 2.8.7.0 has new graphics and f2fs support
PhilZ is stock 6.57.9 cwm v6.0.5.1 shared by @uncomment
Download APP here (contains the 2 recoveries mentioned above): Removed because of bugs.. will fix and upload to new link..
TWRP 2.8.7.0 f2fs with updated graphics flashable zip: https://drive.google.com/file/d/0B3slVcYWwXQ-RjNKUDhWWk5OemM/view?usp=sharing
(This is the latest recovery from TeamWin with their new blue theme.. I personally didn't like all that blue so I changed the images.. See screenshot below)
Philz Touch 6.57.9 flashable zip:https://drive.google.com/file/d/0B3slVcYWwXQ-MEd4TU1vb0NYcmc/view?usp=sharing
Flashable ZIP stock TWRP 2.8.7.0 with f2fs:
Put the zip in you sd card and flash through recovery.. This will push the twrp 2.8.7.0 f2fs to your fota kernel, reboot recovery after flash...
Download: https://drive.google.com/file/d/0B3slVcYWwXQ-YTB6V1N0eEx5SU0/view?usp=sharing
Please test (recovery.img)
UPDATED TO TWRP 2.8.7.0
Download here: https://drive.google.com/file/d/0B3slVcYWwXQ-SjJRRjdyZ2pzeXc/view?usp=sharing
Instructions are the same as below...
This is TWRP 2.8.6.0
Download here:
https://drive.google.com/file/d/0B3slVcYWwXQ-Q0pEYzlFSjhPNFk/view?usp=sharing
Place the recovery.img (it is named twrp.img when you download but rename to recovery.img) to you internal storage and use adb or emulator (download Android Terminal Emulator free from Store) commands to install to your Fota:
su (enter and grant root access if using Emulator)
dd if=/sdcard/recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel (enter)
If you use Xperia Recovery Manager app by @championswimmer, rename the recovery.img to twrp.img and put in the TWRPXperia folder on your sd-card and flash to Fota through the app. Confirmed working.
If the image doesn't install correctly, please flash this hack:
http://forum.xda-developers.com/show...51&postcount=2
Only cache and data/ ext-sdcard is convertible for now, if you try to convert system, you will brick your phone..
Use the following method to convert:
Convert to f2fs by pressing Wipe > Advanced Wipe > select the desired partition > Repair or change filesystem > Change filesystem > f2fs
Some added info by @nostupidthing
with f2fs twrp installed, i've changed /cache and /data into f2fs without wiping. you just have to backup /data, then format it as f2fs, click "use rm-rf instead for format" in twrp settings, then restore /data.
If any one is looking for a theme for twrp recovery, i found an excellent theme here: http://forum.xda-developers.com/android/themes/theme-twrp-materialised-dark-light-play-t2915584
(Download resolution 720x1280 for ZR)
As an added service I am willing to personalize the splash screen at recovery start-up should you have any request ie your name, flag etc but i will insist that "TeamWin" will be present somewhere on your personalized splash.. After all, we all benefit from their hard work.. Do not expect your request to be done within the hour but periodically check and i will upload and link as and when you request is done..
Massive thanks to @uncomment and @o-l-a-v and @Olivier and @blastagator and @qsnc including @nostupidthing for testing and for making this possible. @SdtBarbarossa for the app!!
the "now changing the microsd to f2fs" is not necessary for /data & /cache. you may or may not like to do it, and i ended up not doing it because copying my several gbs of files out of the microsd takes so much time and i just gave up..
but if anyone wants to do it, basically you just copy the files to your PC, then format the microsd to f2fs, then copy the files back there.
nostupidthing said:
the "now changing the microsd to f2fs" is not necessary for /data & /cache. you may or may not like to do it, and i ended up not doing it because copying my several gbs of files out of the microsd takes so much time and i just gave up..
but if anyone wants to do it, basically you just copy the files to your PC, then format the microsd to f2fs, then copy the files back there.
Click to expand...
Click to collapse
I agree with you.. I have formatted my ext sd card but like you said, took ages to copy the content to pc and back again.. In my opinion not worth doing if anyone, like me, use the ext_sd card for storage of music and downloads etc.. Cache and data absolutely worth doing tho.. A great many thanks for your comments and help doing this..
sent from Paul's phone
one more thing. backing up /data via twrp will not back up your "internal sd" files, like camera photos if you store them internally instead of on the microsd, so you have to copy those yourself as well.
Added flashable zip to op... Should make things easier..
the 2.8.7 flashable zip works, bro. thx.
hey, any chance that you make an insaller version ?
Ilko said:
hey, any chance that you make an insaller version ?
Click to expand...
Click to collapse
I'll look in to it..
hagar006 said:
I'll look in to it..
Click to expand...
Click to collapse
Great
BTW, I would suggest you to set TWRP's file manager to open SDCARD1 by default instead of SDCARD0, if possible, or even both to let users choose. I'm not sure if this is ROM or Recovery dependent because it worked this way through the latest Validus ROM. I'd bet on the recovery side though.
Ilko said:
Great
BTW, I would suggest you to set TWRP's file manager to open SDCARD1 by default instead of SDCARD0, if possible, or even both to let users choose. I'm not sure if this is ROM or Recovery dependent because it worked this way through the latest Validus ROM. I'd bet on the recovery side though.
Click to expand...
Click to collapse
It's party of the recovery but a few spaces down from the top in file manager is external_SD and a few spaces lower is SD_card so should be easy enough to find the way around..
BTW I've made new images and things for twrp which makes it a little easier to see but I'm waiting for permission from someone as I used their ui.xml to make that.. Will be added as soon as
Sent from my ZR

r1 - Custom ROM starter template - Honor 6 Plus PE-TL10 B521

Let's get some custom ROM tweaking going on for our 6 Plus'!
Ahead of my own MoDaCo Custom ROM for the 6 Plus, which is coming soon, I've created a custom ROM starter template for anyone who wants to have a go. It's a bit different.
Basically, this ROM template will let you create your own custom ROM VERY easily. Easier than ever before. All you have to do is...
download my ROM template zip
make the changes to the system of your phone just as you'd like them for your custom ROM
run some commands on your device via ADB
add the resulting files to the template zip
That's it! No messaging around with install scripts, no rebuilding anything complex, just mod - and go!
Preparation
ONLY if you are completing the process for the first time, you need to set up a file on your microSD card - so launch and ADB shell and type the following commands...
Code:
touch /sdcard/exclude
echo app > /sdcard/exclude
echo priv-app >> /sdcard/exclude
ROM build
Once you have your system up and running how you want it, and you're ready to distribute it (just the system and cust dirs mind, it won't pull the data dir, so your personal data is safe), reboot to recovery, launch an ADB shell and type the following commands:
Code:
mount /system
tar -X /sdcard/exclude -zcvpf /sdcard/system.therest.tar.gz /system/
tar -zcvpf /sdcard/system.apps.tar.gz /system/app /system/priv-app
mount /cust
tar -zcvpf /sdcard/cust.tar.gz /cust
You'll then end up with 3 new files on your SD card - system.apps.tar.gz (which is apps and priv-apps from system), system.therest.tar.gz (which, as the name suggests, is the rest of the system partition!) and cust.tar.gz with is the cust partition contents.
Update the template zip with these 3 files and that's it. It's ready to distribute for people to flash via TWRP! If you have updated the boot image, you'll need to replace that too, the easiest way is to do a TWRP backup then pull that file from the SD card and drop it into the template zip as boot.img. That's really it!
I hope this inspires a few people to start playing around with custom ROMs for the 6 Plus.. more cool things coming soon!
Oh and the all important template file...
DOWNLOAD - r1-customromtemplate-honor-6plus-petl10-pine-r521.zip [MEGA]
NOTE: You should not flash a template ROM onto a different version base ROM. You should always ensure you have a stock dload ROM to restore to if needed. Use at your own risk!
P
Nice !
I'm waiting !
wOw, this is a really good post.
I would like to have a try the other day.

How-To Modify boot.img for DualBoot Patcher (Android 9)

One of the things I missed most since moving to Oreo and Pie on the Note 4 has been trying out the new ROMs without having to mess with my daily driver setup. After a ton of research and some training on building ROMs from source, I was finally able to make Android Pie boot from any slot on Dualboot patcher. *
What you need?
* An Android Pie ROM
* Android Image Kitchen (AIK)
* modified device tree binary (dtb)
* a text editor
* RAR or some other zip file manager.
Instructions
1) Download and extract AIK from https://forum.xda-developers.com/showthread.php?t=2073775
2) extract the boot.IMG from your ROM to the same folder where you extracted AIK.
3) unpack the boot image using the unpackimg.sh script. This will create a split_img folder and a ramdisk folder.
4) go to the split_img folder and delete boot.img_dt (or boot.img_dtb depending on which version of AIK you are using).
5) copy the attached dtb.img file to the split_img folder and rename it to the original file name (boot.img_dt or boot.img_dtb)
6) go to the ramdisk folder and edit fstab.qcom. change this line:
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait,recoveryonly
To this:
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1,discard wait
7) still in the ramdisk folder, modify init.qcom.rc. change this line **:
mount_all fstab.qcom
To this:
mount_all /fstab.qcom
8) go back to the AIK folder and run repacking.sh. this will create a file called image_new.img.
9) rename image_new.img to boot.img
10) replace the boot.img in your ROM zip file with the new one you just created.
Now you can use DualBoot Patcher to patch the ROM file for any slot and flash the patched file.
Just a few extra notes here:
* I only built these images for Android Pie for Snapdragon Note 4 devices. Make sure you use the the correct file for your device.
** in step 7, I noticed that some ROMs have an earlymount flag. You must delete that flag, otherwise the phone reboots to download mode.
***If anyone has any ideas to make this a flashable process, let me know. I would push these change upstream, but I don't know know enough about Git to do that. And, I don't know if the other devs want these changes.
Ok, so that was the manual way, but these changes can also be added to the kernel and boot image files at the time you build your ROM. Here is where you make the changes:
In the kernel, go to the dts sources. The file to modify is this one:
kernel/samsung/apq8084/arch/arm/boot/dts/qcom/aps8084.dtsi
Find this section and delete it:
Code:
system {
compatible = "android,system";
dev = "/dev/block/platform/msm_sdcc.1/by-name/system";
type = "ext4";
mnt_flags = "ro,barrier=1,discard";
fsmgr_flags = "wait";
status = "ok";
};
In the boot image, there are 2 files to modify.
1) device/samsung/trlte-common/rootdir/etc/fstab.qcom
Change this line:
Code:
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait,recoveryonly
to this:
Code:
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1,discard wait
2) device/samsung/trlte-common/rootdir/etc/init.qcom.rc
Change this line:
Code:
mount_all fstab.qcom
to this:
Code:
mount_all /fstab.qcom
That's it. Build the ROM and it will be compatible with DualBoot Patcher. Since those are common files across the TRLTE, TBLTE and DUOS devices, all of those builds will be compatible with dualboot patcher.
So, one more thing. There are limitations to what you can install with DualBoot Patcher. Most things are easy to get around, though.
1) Flashable zip's that use Aroma installer might not change their behavior after being patched, and might install to your primary ROM slot anyway. Just something to be aware of.
2) Any flashable zip that has a custom script for updater-binary will fail to flash after being patched. For example, all the MicroG installers that I know of use custom scripts instead of the real updater-binary.
3) you cannot install a patched Magisk zip. But, you can install the Magisk Manager in your ROM, tap the install button (and the next install button that shows up), choose "Select and Patch a file", then choose the boot image from the Multiboot folder on your internal storage (/sdcard). It will patch the boot image and leave a file called "magisk_patched.img" in your Download folder on the internal storage (/sdcard). Use TWRP to flash this file to your boot partition, then reboot. Open DualBoot Patcher, tap the 3-dot button next to the ROM name, and tap "Set Kernel" to replace the saved boot image with the Magisk patched boot image. Note: if you accidentally
4) Magisk doesn't do much. You can use it to grant superuser permissions, but modules only work on the primary ROM.
5) custom kernels probably include their own dtb files. Flashpoint is an example of this. You may have to update the zip to remove the existing dtb file and add one of the files attached to OP. Make sure you rename it to match the original name in the zip file.
I set up my primary ROM per the above instructions, installed it, and I am trying to get my secondary rom installed. Do I need to set it up the same way (it is a 7.1.2 rom). When I patch it (7.1.2) through Dual Boot and try to flash it I get the following error.... " Failed to create temporary image /raw/data/.system.img.tmp" and it fails to flash. I've tried setting it both as secondary and in slot 1.... Any help would be appreciated... Hopefully I am just missing something simple.
rickpub said:
I set up my primary ROM per the above instructions, installed it, and I am trying to get my secondary rom installed. Do I need to set it up the same way (it is a 7.1.2 rom). When I patch it (7.1.2) through Dual Boot and try to flash it I get the following error.... " Failed to create temporary image /raw/data/.system.img.tmp" and it fails to flash. I've tried setting it both as secondary and in slot 1.... Any help would be appreciated... Hopefully I am just missing something simple.
Click to expand...
Click to collapse
What Rom are you trying to flash? Do you have enough space available on system or cache to flash that Rom? If not, try patching it for a data slot instead.
thanks
why when i do this the rom that have modified wont turn wifi on ?
n910f
i try it on linageos pie and havocos 2.8 and both have same issue after doing this solution
samdakid said:
thanks
why when i do this the rom that have modified wont turn wifi on ?
n910f
i try it on linageos pie and havocos 2.8 and both have same issue after doing this solution
Click to expand...
Click to collapse
That's really odd. Maybe I need to update the dtb images here. I will try to do that this weekend.
Would love to try this out

Categories

Resources