How-To Modify boot.img for DualBoot Patcher (Android 9) - Galaxy Note 4 General

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

Related

Configuring Dual Boot [Flashable Configuration Zip v1.0 Released! 23 Jul 2012]

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...

[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)

r1 - Custom ROM starter template - Honor 6 H60-L04 B820

Let's get some custom ROM tweaking going on for our 6s!
Ahead of my own MoDaCo Custom ROM for the 6, 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.. more cool things coming soon!
Oh and the all important template file...
DOWNLOAD - r1-customromtemplate-honor-6-h60l04-mogolia-b820.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
I'm not familiar with rom developement but I was told that custom roms were impossible for Honor 6. So is it now fully possible ?
Has huawei changed their policy about sources ?
Only stock based ROMs. Source is still very limited.
P
Sent from my HUAWEI NXT-L29 using Tapatalk
Good news Paul!
Sent from my H60-L04 using XDA-Developers mobile app
Thanks for your work.

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.

Make Honor 6 Multi-booted

Since I posted a request to make Dual Boot Patcher Support honor 6 as an issue on github but no response,I'm here to post a tutorial to make the dual boot patcher "unofficially support" our device.
Then we can install two roms on our phone,and switch between them like installing two Windows systems on a PC.
This just support switching between systems based on the same Android version,and I have only tested on honor 6.
You need to have a rooted&fully unlocked phone.
I'm not responsible to any consequences .
We need to download and install dual boot patcher app first.
Second download this https://drive.google.com/uc?id=0Byw7MVzb0VBXOUtUTUR1MUF2YzA&export=download
And rename it to devices.json
Open Dual Boot Patcher app once, then go to settings,force stop the dual boot patcher.
Install es file manager or root explorer or any root file manager you like.
Then go to /data/data/com.github.chenxiaolong.dualbootpatcher/files/data-xxx(only one folder like this)
Replace the devices.json file to with your downloaded file and set permission to rwxrwxrwx.
Open Dual Boot Patcher app again,then it will identify honor 6.Then open file manager and go to /sdcard/multiboot. Create a new folder "primary".Then backup your current system's boot partition with Rashr . Get the boot.img and put it into the primary folder.
Open dual boot patcher,swipe from left to right, click rom,then click the three dots on the right of primary .And then click "update ramdisk".
Then reboot.Now you will get a working Dual Boot Patcher app.
If you want to install a second rom, you need to patch it in the main menu.After install ,you have to extract the boot.img from the zip and go to /sdcard/multiboot/data-slot-xxx(the rom name you specified)and put the boot.img in it. Then click update ramdisk on your target rom on dual boot patcher like the primary rom.Then you will be able to switch to the second rom and enjoy. If you want to switch back you need to install dual boot patcher on the second rom and replace the devices.json file.
Enjoy switching between the emui&miui&aosp!
failed to update ramdisk
fxsheep said:
Since I posted a request to make Dual Boot Patcher Support honor 6 as an issue on github but no response,I'm here to post a tutorial to make the dual boot patcher "unofficially support" our device.
Then we can install two roms on our phone,and switch between them like installing two Windows systems on a PC.
This just support switching between systems based on the same Android version,and I have only tested on honor 6.
You need to have a rooted&fully unlocked phone.
I'm not responsible to any consequences .
We need to download and install dual boot patcher app first.
Second download this
And rename it to devices.json
Open Dual Boot Patcher app once, then go to settings,force stop the dual boot patcher.
Install es file manager or root explorer or any root file manager you like.
Then go to /data/data/com.github.chenxiaolong.dualbootpatcher/files/data-xxx(only one folder like this)
Replace the devices.json file to with your downloaded file and set permission to rwxrwxrwx.
Open Dual Boot Patcher app again,then it will identify honor 6.Then open file manager and go to /sdcard/multiboot. Create a new folder "primary".Then backup your current system's boot partition with Rashr . Get the boot.img and put it into the primary folder.
Open dual boot patcher,swipe from left to right, click rom,then click the three dots on the right of primary .And then click "update ramdisk".
Then reboot.Now you will get a working Dual Boot Patcher app.
If you want to install a second rom, you need to patch it in the main menu.After install ,you have to extract the boot.img from the zip and go to /sdcard/multiboot/data-slot-xxx(the rom name you specified)and put the boot.img in it. Then click update ramdisk on your target rom on dual boot patcher like the primary rom.Then you will be able to switch to the second rom and enjoy. If you want to switch back you need to install dual boot patcher on the second rom and replace the devices.json file.
Enjoy switching between the emui&miui&aosp!
Click to expand...
Click to collapse
I was failed when I cilck "update ramdisk" after I put the boot.img into the primary folder.help
Polaris_mile said:
I was failed when I cilck "update ramdisk" after I put the boot.img into the primary folder.help
Click to expand...
Click to collapse
This may happen sometimes.Try to patch a file.If patching don't work, follow the steps again.This needs trying and luck since it's not officially supported.Be sure you're on emui4.0 firmware or your phone will be hard bricked.
fxsheep said:
This may happen sometimes.Try to patch a file.If patching don't work, follow the steps again.This needs trying and luck since it's not officially supported.Be sure you're on emui4.0 firmware or your phone will be hard bricked.
Click to expand...
Click to collapse
it also failed to patch a file.I can't choose the device.There are no devices' names.
Polaris_mile said:
it also failed to patch a file.I can't choose the device.There are no devices' names.
Click to expand...
Click to collapse
Then try an older version.I uninstalled it,and reinstalled with the same step and it works successfully.

Categories

Resources