[GUIDE][ROM PORTING][CM12/CM13][MediaTek][mt6582] CM ROM Porting Guide. - Miscellaneous Android Development

_______________________________
| ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶ |
| ¶¶PORTING METHOD MTK¶ |
| ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶ |
---------------------------------------------
[emoji2]
NOTE:
---------
BEFORE WE START, NO ONE IS TO BE HELD RESPONSIBLE IF DEVICE GETS DAMAGE OR WHATS SO EVER..
###Chill, that was for Disclaimers!!!
*OK
××××××××××××××××××××××××××××××××××
¶¶¶¶for cm13¶¶¶¶
¶¶¶for cm12.1¶¶¶
×××××××××××××××××
Copy & Replace From Stock/CM12.1:::
---->system/etc/firmware
---->system/lib/hw/hwcomposer.mt65xx.so
system/lib/ {the following files} ↓↓↓
---->lib3a.so
---->libaudio.primary.defualt.so
---->libcamalgo.so
---->libcamdrv.so
---->libcameracustom.so
---->libdpframework.so
---->libfeatureio.so
---->libimageio.so
---->libMali.so
Patching Boot.img :::
---->kernel
---->ueventd.rc {add this only when bootloop}
Patching build.prop :::
{replace "xxx" with stock build.prop}
----> ro.product.brand=xxx
ro.product.name=xxx
ro.product.board=xxx
ro.product.manufacturer=xxx
ro.product.locale.language=xxx
ro.product.locale.region=xxx
ro.sf.lcd_density=xxx
ro.product.board=xxx
ro.board.platform=xxx
to.cm.device="your device name"
qemu.hw.mainkeys=xxx
Patching Updater Script :::
{replace " mmcblk0pxx " after the "p" where " xx " with your mount points}
---->Locate :
/META-INF/com/google/android/updater-script
----> format("ext4", "EMMC", "/dev/block/mmcblk0pxx", "/system", "");
----> mount("ext4", "EMMC", "/dev/block/mmcblk0pxx", "/system", "");
----> mount("ext4", "EMMC", "/dev/block/mmcblk0pxx", "/data", "");
============================
Get More info from [https://www.facebook.com/groups/1024872487548231/]
=========================
*Make You Don't Mess Up With Your Precious Device.
*Thanks.
Credit:
#Ferhung
#Android Matrix Development {AMD}
@iykeDROID
=========================================

iykeDROID™ said:
Patching Boot.img :::
---->kernel
---->ueventd.rc {add this only when bootloop}
Patching build.prop :::
{replace "xxx" with stock build.prop}
----> ro.product.brand=xxx
ro.product.name=xxx
ro.product.board=xxx
ro.product.manufacturer=xxx
ro.product.locale.language=xxx
ro.product.locale.region=xxx
ro.sf.lcd_density=xxx
ro.product.board=xxx
ro.board.platform=xxx
to.cm.device="your device name"
qemu.hw.mainkeys=xxx
Patching Updater Script :::
{replace " mmcblk0pxx " after the "p" where " xx " with your mount points}
---->Locate :
/META-INF/com/google/android/updater-script
----> format("ext4", "EMMC", "/dev/block/mmcblk0pxx", "/system", "");
----> mount("ext4", "EMMC", "/dev/block/mmcblk0pxx", "/system", "");
----> mount("ext4", "EMMC", "/dev/block/mmcblk0pxx", "/data", "");
============================
Get More info from [https://www.facebook.com/groups/computerplusandroid/]
=========================
*Make You Don't Mess Up With Your Precious Device.
*Thanks.
Credit:
#Ferhung
#Unknown Porting Team ; No Problems @iykeDROID
=========================================
Click to expand...
Click to collapse
No mount points on newer mt6580 bro, it seem like their rom structures are different

Bro this guide will work with all chipset ??

obaidmuneir said:
Bro this guide will work with all chipset ??
Click to expand...
Click to collapse
Not all chipset but works mostly across most MTK chipsets

@iykeDROID yeah bro we meet again ... i dont have experience building from source and bad laptop as you know ...just for fun i download
uhans5000 oreo 64bit
moto e4 lineage 15 oreo 32bit ( your work )
*what is my game ? *copy / paste replace files in system.img and boot.img and then flash those .img file directly to see if i boot or if anything works ...is this impossible cos of 32-64 bit issue
*where is driver for screen because phone is using different display so i need to make sure to make this work
i just do this for fun cos its only option for me in regard to time amd situation ...i dont publish result only for me ...if you want to advise me ...about trying some sort of port for fun okay thanks ....
IN days of LL i ported one or two rom succesfully so i am not 100% dum just 99%
see you around bro
Sent from my woods_f using XDA Labs

Related

[Completed] [step-by-step]how to port custom roms for your mtk and snapdragon devices☺

:HELLO guys..I'm here to guide you how to port custom ROMs for your mtk and snapdragon device..this guide is noob friendly.. Just follow the steps as given.
NOTE--IM AND XDA TOO NOT RESPONSIBLE FOR ANY DAMAGES FOR YOUR DEVICES..FLASHING CUSTOM ROMS VOIDS WARRENTY
So let's start ..
FOR MEDIATECH PHONES
Works for..
MT6589 to MT6577
MT6582 to MT6572
MT6577 to MT6575
Also with SAME SOC LIKE
MT6589 TO MT6589
MT6572 TO MT6572
MT6582 TO MT6582
ETC...
No Need of Source Code
No Need of Kernel Source
No Need of **ANDROID KITCHEN
No Need of LINUX...
Requirements:
* A Brain
* Patience
* Windows XP/7/8
* 7-Zip
* Notepad++
* Bootimg Unpack/Repack Tools for Windows!
* Stock ROM
* And a Little Respect!!
So now Lets Begin...
PORTING For Same SoCs ( Ex: MT6572 to MT6572)
* Replace these from your Stock ROM to the ROM u want to PORT!! Lets Call it "PORT"
*now you need to replace some files from stock to port ROM...first delete them all mentioned from port ROM and then transfer from stock
FILES NEEDS TO BE REPLACED.
Code:
*system/vendor
*system/usr
*system/lib/modules
*system/lib/hw
*system/lib/libncurses.so
*system/etc/firmware
*system/etc/vold.fstab
*system/etc/vold.fstab.nand
*system/etc/bluetooth:good:
For Fixing Problems...
Code:
*system/etc/permissions
*system/etc/security
*system/etc/audio
*system/etc/wifi
*system/lib/drm
*system/lisystem/lib/soundfx
* Now Replace the Stock Boot.img to Port ROM!
* Now Open The Port ROM folder and go to META-INF/google/android and open updater-script in Notepad++
* Do the same for the Stock ROM
* Now In the Port ROM's Updater Script, find a line that starts with this...
format(".......
and only replace the mmcblk0p.. with the stock one!
* Do the same for this line...
mount("...
Example:
This is the PORT one!!!
Code:
format("ext4", "EMMC", "/dev/block/mmcblk0p5", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/system");
This is the Stock one!!
Code:
format("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");
Now just Replace the "mmcblk0p3" from STOCK to PORT!!
It should look like this:
Code:
format("ext4", "EMMC", "/dev/block/mmcblk0p3", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");
DO NOT REPLACE THE WHOLE LINE!
NOW COME TO THE MOST IMPORTANT PART..WITHOUT THIS STCOSTEP,ROM WILL NOT BOOT UP.
DOWNLOAD FIRST BOOT IMG UNPACK REPACK TOOL...
then you need to create two folder like "stock" and "port"(sometimes the tool caintain both the folder)...
Put the both boot.IMG in their respective folders..(stock boot.IMG in stock and port.boot.IMG in port folder.
Now unpack both the boot.IMG
Then copy and replace the port kernel with stock one..I.e.transfer your stock kernel to port folder..and finally repack it.
* Now go back to the Folder of Port ROM and You'll see 2 folders & 1 file named
-META-INF
-system
-boot.img
* Now Select these three and Click Right Mouse Button and Click on 7-Zip ->> Add to Archive
* Now a dialouge box should appear!
* Configure the Format like This:
Archive format: ZIP
Compression Level : Normal
Compression Method: Deflate
Dictoioany Size: 32k
Word Size 32
* Now Start Zipping and Push the ZIP to your Memory Card
* Go to Recovery >> Install ZIP & Wipe Data
Finished!!
DONT FORGET TO HIT THANKS TO MY PROFIKE...IF YOU HIT THANKS YOUR ROM WILL 100% BOOT UPUP
The ROM porting for snapdragon soc and cross porting on mtk is on my next thread
CREDITS==
@HERCULES
AND OTHER DEVOLOPERS FROM XDA WHOM I TAKE REFFERANCE.
Hello,
XDA Assist is for newbies finding their way around on XDA. Not to post tutorials.
Post here:
Android
Thread closed.
Kind regards
Trafalgar Square
XDA Assist

Port a custom rom to your phone without pc [MediaTek only]

Requirements ----
1)A file manager(MixPlorer recommended.Because of its multi-tab feature)
2)Archiver(Zarchiver recommend.Because of its fast compression-decompression feature and user-friendly interface.
PORTING For Same SoCs ( Ex: MT6572 to MT6572 )
*First extract your port rom using Zarchiver in a folder and lets call it the 'port' folder.
*U will see some folder like Meta.inf,system,boot.img,logo.bin etc.
*Get your stock rom and extract it too in another folder.
(Now we have both stock and port rom extracted)
*Now repace this files from stock to port folder--
FILE LIST FOR REPLACING:
Code:
*system/vendor
*system/usr
*system/lib/modules
*system/lib/hw
*system/lib/libncurses.so
*system/etc/firmware
*system/etc/vold.fstab
*system/etc/vold.fstab.nand
*system/etc/bluetooth
Code:
For Fixing Problems...
*system/etc/permissions
*system/etc/security
*system/etc/audio
*system/etc/wifi
*system/lib/drm
*system/lisystem/lib/soundfx
* Now Replace the Stock Boot.img to Port ROM!
* Now Open The Port ROM folder and go to---
META-INF/
google/android
and
open updater-script in MixPlorer(or any other text editor you like)
* Do the same for the Stock ROM
* Now In the Port ROM's Updater Script, find a line that
starts with this...
format(".......
and only replace the mmcblk0p.. with the stock one!
* Do the same for this line...
mount("...
Example:
This is the PORT one!!!
Code:
format("ext4", "EMMC", "/dev/block/
mmcblk0p5", "0", "/system");
mount("ext4", "EMMC", "/dev/block/
mmcblk0p5", "/system");
This is the Stock one!!
Code:
format("ext4", "EMMC", "/dev/block/
mmcblk0p3", "/system");
mount("ext4", "EMMC", "/dev/block/
mmcblk0p3", "/system");
Now just Replace the "mmcblk0p3" from STOCK to PORT!!
It should look like this:
Code:
format("ext4", "EMMC", "/dev/block/
mmcblk0p3", "0", "/system");
mount("ext4", "EMMC", "/dev/block/
mmcblk0p3", "/system");
DO NOT REPLACE THE WHOLE LINE!
* Now go back to the Folder of Port ROM and You'll see 2
folders & 1 file(maybe more) named
-META-INF
-system
-boot.img
Select all these files with Zarchiver and press hold on them.
A pop-up menu will appear and hit compress.
Select this--
Compression FORMAT -- ZIP
Compression type -- Normal
Done...
Compression will be started...
After compression flash it from recovery.
If you see a status 6 or 7 error,then u must have did something wrong in updater script.
See some youtube video's to solve it.
And yeah,this is guide to port stock modded roms.If u want to port MIUI,CM,AOKP,SLIM etc...
Than your have to edit boot.img(kernel).
I will write a guide for this(yeah,without pc)
Keep porting roms
Facing problems???
I'm here
reserved
bump
Nice tutorial :laugh:
But I was not able to find any port ROMs for my Galaxy Star
Have u ported any for it from stock??
adth98 said:
Nice tutorial :laugh:
But I was not able to find any port ROMs for my Galaxy Star
Have u ported any for it from stock??
Click to expand...
Click to collapse
I guess somebody else already ported RR from SGS2!
Check 'GS Android Development' forum.
Yup I was using that ROM:victory:
sm_adil said:
Yup I was using that ROM:victory:
Click to expand...
Click to collapse
does rebooting takes a long time?
For me it took about 15-20 min...
But works fine also later on rebooting it takes lot of time....
Bro how to port custom roms like viper os??? Does it works for that too??
I have a local brandless phone.
Specs are:
SoC: MT6572
RAM: 512MB
ROM: 4GIG
Processor: 1.2GHz dual core
Since it's a crap phone, I'm looking for 8.1 Go ROM for it. Anyone have it?
Sent from my Xperia 1 using XDA Labs
Port custom ROM like miui aosp
Sir where is the guide to port custom ROM miui etc

Full firmware B535 package

Honor released a new full package since B525
Now it's B535
Link http://cdn.powerapp.io/lfs/v3/s/307...d3d6c3538cecf6e2f97c3b321be3487224aea6dc70a1c
Mirror: https://mega.nz/#!j5QwRLzI!CGBlUpD7s15B5u88KH0oWogXzb0m6eSVQ3b1Y1Ak_Cw
Unfortunately I got no massive changelog
This update optimized Magic Live wallet and other product experience, improve system stability. "," VersionInfo ": [{" array ": [" optimization - support binding bank card for payment
With this updates codes also a script file that only flashes a delete script see
ui_print("Unpacking data new files...");
delete_recursive("/data/hw_init");
package_extract_dir("data", "/data");
delete(
" ");
delete_recursive(
"/data/data",
"/data/system",
"/data/user",
"/data/share",
"/data/app",
"/data/app-asec",
"/data/app-lib",
"/data/app-private",
"/data/app_acc",
"/data/property",
"/data/lb",
"/data/lib_bee",
"/data/local",
"/data/media",
"/data/mediadrm",
"/data/misc",
"/data/pppd_via",
"/data/resource-cache",
"/data/sec_storage_data",
"/data/skin",
" ");
I guess this is flashed first before update
Sent from my NATASHA using Tapatalk

[ROM][STABLE][FW-LESS] MIUI 10 by Xiaomi.eu for Whyred; + method to remove firmware

As you all know, flashing MIUI ROMs have become a bit tricky for Whyred users, due to the Anti-roll back issue. But fear not, @AL_IRAQI has found the solution, and I'll explain here how that goes, and I'll also link to the first Stable MIUI 10 in English by Xiaomi.eu. That ROM will not require this process, as pointed out by @dingdong3000 here.
► Why do you want this?
• Well, right now, the only Stable MIUI 10 for Whyred is Chinese. But Xiaomi.eu is based on the Chinese release, so their Stable ROM is basically the better Global version. Also, all of their ROMs pass the SafetyNet test without any issue, even if you directly modify parts of the system.​
► How can you download?
• Download from official SourceForge link. DOWNLOAD​
► How can you make the modification yourself?
• That's actually the prime purpose of this thread. There are basically 2 things to do when you want to make a MIUI ROM fw-less. Follow this procedure:​
Download your desired ROM.
Open it with WinRAR (No need to extract).
Delete the folder title "firmware-update" from the list.
Go inside META-INF\com\google\android.
Double click on "updater-script".
Select "Notepad++" from the list. (IMPORTANT. Normal Notepad doesn't have a line count. Download it from here.)
We need to remove all the radio update tasks. To do that, remove the red colored lines from the code.
Code:
getprop("ro.product.device") == "whyred" || abort("E3004: This package is for \"whyred\" devices; this is a \"" + getprop("ro.product.device") + "\".");
ui_print("Target: xiaomi/whyred/whyred:8.1.0/OPM1.171019.011/V9.5.19.0.OEIMIFA:user/release-keys");
show_progress(0.100000, 5);
show_progress(0.200000, 10);
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");
[COLOR="Red"]
# ---- radio update tasks ----
ui_print("Patching firmware images...");
ifelse(msm.boot_update("main"), (
package_extract_file("firmware-update/mdtpsecapp.mbn", "/dev/block/bootdevice/by-name/mdtpsecapp");
package_extract_file("firmware-update/cmnlib64.mbn", "/dev/block/bootdevice/by-name/cmnlib64");
package_extract_file("firmware-update/splash.img", "/dev/block/bootdevice/by-name/splash");
package_extract_file("firmware-update/cmnlib.mbn", "/dev/block/bootdevice/by-name/cmnlib");
package_extract_file("firmware-update/hyp.mbn", "/dev/block/bootdevice/by-name/hyp");
package_extract_file("firmware-update/pmic.elf", "/dev/block/bootdevice/by-name/pmic");
package_extract_file("firmware-update/tz.mbn", "/dev/block/bootdevice/by-name/tz");
package_extract_file("firmware-update/abl.elf", "/dev/block/bootdevice/by-name/abl");
package_extract_file("firmware-update/devcfg.mbn", "/dev/block/bootdevice/by-name/devcfg");
package_extract_file("firmware-update/keymaster.mbn", "/dev/block/bootdevice/by-name/keymaster");
package_extract_file("firmware-update/xbl.elf", "/dev/block/bootdevice/by-name/xbl");
package_extract_file("firmware-update/rpm.mbn", "/dev/block/bootdevice/by-name/rpm");
), "");
ifelse(msm.boot_update("backup"), (
package_extract_file("firmware-update/cmnlib64.mbn", "/dev/block/bootdevice/by-name/cmnlib64bak");
package_extract_file("firmware-update/cmnlib.mbn", "/dev/block/bootdevice/by-name/cmnlibbak");
package_extract_file("firmware-update/hyp.mbn", "/dev/block/bootdevice/by-name/hypbak");
package_extract_file("firmware-update/tz.mbn", "/dev/block/bootdevice/by-name/tzbak");
package_extract_file("firmware-update/abl.elf", "/dev/block/bootdevice/by-name/ablbak");
package_extract_file("firmware-update/devcfg.mbn", "/dev/block/bootdevice/by-name/devcfgbak");
package_extract_file("firmware-update/keymaster.mbn", "/dev/block/bootdevice/by-name/keymasterbak");
package_extract_file("firmware-update/xbl.elf", "/dev/block/bootdevice/by-name/xblbak");
package_extract_file("firmware-update/rpm.mbn", "/dev/block/bootdevice/by-name/rpmbak");
), "");
msm.boot_update("finalize");
package_extract_file("firmware-update/dspso.bin", "/dev/block/bootdevice/by-name/dsp");
package_extract_file("firmware-update/NON-HLOS.bin", "/dev/block/bootdevice/by-name/modem");
package_extract_file("firmware-update/BTFM.bin", "/dev/block/bootdevice/by-name/bluetooth");[/COLOR]
show_progress(0.600000, 250);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
ui_print("Patching vendor image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/vendor", package_extract_file("vendor.transfer.list"), "vendor.new.dat.br", "vendor.patch.dat") ||
abort("E2001: Failed to update vendor image.");
show_progress(0.100000, 2);
set_progress(1.000000);
The final copy should look like this-
Code:
getprop("ro.product.device") == "whyred" || abort("E3004: This package is for \"whyred\" devices; this is a \"" + getprop("ro.product.device") + "\".");
ui_print("Target: xiaomi/whyred/whyred:8.1.0/OPM1.171019.011/V9.5.19.0.OEIMIFA:user/release-keys");
show_progress(0.100000, 5);
show_progress(0.200000, 10);
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");
show_progress(0.600000, 250);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
ui_print("Patching vendor image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/vendor", package_extract_file("vendor.transfer.list"), "vendor.new.dat.br", "vendor.patch.dat") ||
abort("E2001: Failed to update vendor image.");
show_progress(0.100000, 2);
set_progress(1.000000);
Notice the blank line at the end, don't remove it. Global ROM seems to have 14 lines of code with 1 blank line at the end after this process.
Save the file, WinRAR will ask if you want to update the archive, permit it.
Your ROM is now fw-less. Enjoy.
► You bricked your phone?
Sorry, I can't help you if you messed something up. That's the disclaimer here. You do this with all liability to yourself.​
► Want to learn more?
• Everything About Anti Roll-back [Whyred]
• Redmi Note 5/Pro Miui ROMs without firmware [fw-less]​
► Should you be careful?
• I don't exactly know how far behind you can go, do that research yourself and let me know so I can update it here. But I'd recommend not going too far behind. If you go too far, even after following this process, your phone might end up bricking. Some ROMs are just too old.​
Isn't Xiaomi EU Firmware less itself ?
FroZine said:
Isn't Xiaomi EU Firmware less itself ?
Click to expand...
Click to collapse
As I already said, the version they released has the firmware update folder, which suggests that it isn't firmware less.
Thank you for this. Just to be on the same note, if I'm on latest 9.6.4 stable global I should be ok to flash this firmless ROM right? I just wanna make sure because I tried to flash MIUI pro 10 and bricked my device
NaeemBolchhi said:
As I already said, the version they released has the firmware update folder, which suggests that it isn't firmware less.
Click to expand...
Click to collapse
The firmware inside this xiaomi.eu 10 stable rom won't trigger ARB. It only updates BT, DSP, and modem not bootloader so ARB is safe.
dingdong3000 said:
The firmware inside this xiaomi.eu 10 stable rom won't trigger ARB. It only updates BT, DSP, and modem not bootloader so ARB is safe.
Click to expand...
Click to collapse
Yeah, just found out myself as well. So I guess I'll remove the download link and just keep the method.
coco1476 said:
Thank you for this. Just to be on the same note, if I'm on latest 9.6.4 stable global I should be ok to flash this firmless ROM right? I just wanna make sure because I tried to flash MIUI pro 10 and bricked my device
Click to expand...
Click to collapse
Use the official ROM, it'll work just fine. Skip mine.
NaeemBolchhi said:
Yeah, just found out myself as well. So I guess I'll remove the download link and just keep the method.
Use the official ROM, it'll work just fine. Skip mine.
Click to expand...
Click to collapse
OP I'm still complicated.. you have provided a link. Can you tell me if I flash that will it my ARB or not? Is it safe to flash?
1Ishara said:
OP I'm still complicated.. you have provided a link. Can you tell me if I flash that will it my ARB or not? Is it safe to flash?
Click to expand...
Click to collapse
My link leads to the SourceForge location, the rom works on both Ai and Pro Whyred devices. As someone mentioned above, it doesn't touch ARB, so no worries. I had previously added a different rom due to a misunderstanding. The current one is perfect.
Nice tutorial. Helped me a lot. Successfully installed latest global build. Keep up the good work. Thanks & please keep us updated
---------- Post added at 07:19 PM ---------- Previous post was at 07:03 PM ----------
@Naeem Will the system ota update stop completely by this method? I don't want ota updates.
NaeemBolchhi said:
My link leads to the SourceForge location, the rom works on both Ai and Pro Whyred devices. As someone mentioned above, it doesn't touch ARB, so no worries. I had previously added a different rom due to a misunderstanding. The current one is perfect.
Click to expand...
Click to collapse
Thank you very much. Off topic how about the battery life of xiaomi.eu stable? Im currently on masik i need to change the rom.
I tried your method exactly like you said with muipro 10 and bricked my device... again, but thanks to the new unbrick method I was able to unbrick it for free this time
In flash files long lists with the numbers of apps to be flashed are given. It would be highly useful if someone provides names of the corresponding apps that are associated with the numbers. I'm certain bloat can be minimised to some extent with this.
In terms of stability and performance it is better Xiaomi.eu or Miui Global?
coco1476 said:
I tried your method exactly like you said with muipro 10 and bricked my device... again, but thanks to the new unbrick method I was able to unbrick it for free this time
Click to expand...
Click to collapse
Which method that you used to unbrick the device, could you please share?
---------- Post added at 03:54 AM ---------- Previous post was at 03:46 AM ----------
NaeemBolchhi said:
As you all know, flashing MIUI ROMs have become a bit tricky for Whyred users, due to the Anti-roll back issue. But fear not, @AL_IRAQI has found the solution, and I'll explain here how that goes, and I'll also link to the first Stable MIUI 10 in English by Xiaomi.eu. That ROM will not require this process, as pointed out by @dingdong3000 here.
► Why do you want this?
• Well, right now, the only Stable MIUI 10 for Whyred is Chinese. But Xiaomi.eu is based on the Chinese release, so their Stable ROM is basically the better Global version. Also, all of their ROMs pass the SafetyNet test without any issue, even if you directly modify parts of the system.​
► How can you download?
• Download from official SourceForge link. DOWNLOAD​
► How can you make the modification yourself?
• That's actually the prime purpose of this thread. There are basically 2 things to do when you want to make a MIUI ROM fw-less. Follow this procedure:​
Download your desired ROM.
Open it with WinRAR (No need to extract).
Delete the folder title "firmware-update" from the list.
Go inside META-INF\com\google\android.
Double click on "updater-script".
Select "Notepad++" from the list. (IMPORTANT. Normal Notepad doesn't have a line count. Download it from here.)
We need to remove all the radio update tasks. To do that, remove the red colored lines from the code.
Code:
getprop("ro.product.device") == "whyred" || abort("E3004: This package is for \"whyred\" devices; this is a \"" + getprop("ro.product.device") + "\".");
ui_print("Target: xiaomi/whyred/whyred:8.1.0/OPM1.171019.011/V9.5.19.0.OEIMIFA:user/release-keys");
show_progress(0.100000, 5);
show_progress(0.200000, 10);
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");
[COLOR="Red"]
# ---- radio update tasks ----
ui_print("Patching firmware images...");
ifelse(msm.boot_update("main"), (
package_extract_file("firmware-update/mdtpsecapp.mbn", "/dev/block/bootdevice/by-name/mdtpsecapp");
package_extract_file("firmware-update/cmnlib64.mbn", "/dev/block/bootdevice/by-name/cmnlib64");
package_extract_file("firmware-update/splash.img", "/dev/block/bootdevice/by-name/splash");
package_extract_file("firmware-update/cmnlib.mbn", "/dev/block/bootdevice/by-name/cmnlib");
package_extract_file("firmware-update/hyp.mbn", "/dev/block/bootdevice/by-name/hyp");
package_extract_file("firmware-update/pmic.elf", "/dev/block/bootdevice/by-name/pmic");
package_extract_file("firmware-update/tz.mbn", "/dev/block/bootdevice/by-name/tz");
package_extract_file("firmware-update/abl.elf", "/dev/block/bootdevice/by-name/abl");
package_extract_file("firmware-update/devcfg.mbn", "/dev/block/bootdevice/by-name/devcfg");
package_extract_file("firmware-update/keymaster.mbn", "/dev/block/bootdevice/by-name/keymaster");
package_extract_file("firmware-update/xbl.elf", "/dev/block/bootdevice/by-name/xbl");
package_extract_file("firmware-update/rpm.mbn", "/dev/block/bootdevice/by-name/rpm");
), "");
ifelse(msm.boot_update("backup"), (
package_extract_file("firmware-update/cmnlib64.mbn", "/dev/block/bootdevice/by-name/cmnlib64bak");
package_extract_file("firmware-update/cmnlib.mbn", "/dev/block/bootdevice/by-name/cmnlibbak");
package_extract_file("firmware-update/hyp.mbn", "/dev/block/bootdevice/by-name/hypbak");
package_extract_file("firmware-update/tz.mbn", "/dev/block/bootdevice/by-name/tzbak");
package_extract_file("firmware-update/abl.elf", "/dev/block/bootdevice/by-name/ablbak");
package_extract_file("firmware-update/devcfg.mbn", "/dev/block/bootdevice/by-name/devcfgbak");
package_extract_file("firmware-update/keymaster.mbn", "/dev/block/bootdevice/by-name/keymasterbak");
package_extract_file("firmware-update/xbl.elf", "/dev/block/bootdevice/by-name/xblbak");
package_extract_file("firmware-update/rpm.mbn", "/dev/block/bootdevice/by-name/rpmbak");
), "");
msm.boot_update("finalize");
package_extract_file("firmware-update/dspso.bin", "/dev/block/bootdevice/by-name/dsp");
package_extract_file("firmware-update/NON-HLOS.bin", "/dev/block/bootdevice/by-name/modem");
package_extract_file("firmware-update/BTFM.bin", "/dev/block/bootdevice/by-name/bluetooth");[/COLOR]
show_progress(0.600000, 250);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
ui_print("Patching vendor image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/vendor", package_extract_file("vendor.transfer.list"), "vendor.new.dat.br", "vendor.patch.dat") ||
abort("E2001: Failed to update vendor image.");
show_progress(0.100000, 2);
set_progress(1.000000);
The final copy should look like this-
Code:
getprop("ro.product.device") == "whyred" || abort("E3004: This package is for \"whyred\" devices; this is a \"" + getprop("ro.product.device") + "\".");
ui_print("Target: xiaomi/whyred/whyred:8.1.0/OPM1.171019.011/V9.5.19.0.OEIMIFA:user/release-keys");
show_progress(0.100000, 5);
show_progress(0.200000, 10);
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");
show_progress(0.600000, 250);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
ui_print("Patching vendor image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/vendor", package_extract_file("vendor.transfer.list"), "vendor.new.dat.br", "vendor.patch.dat") ||
abort("E2001: Failed to update vendor image.");
show_progress(0.100000, 2);
set_progress(1.000000);
Notice the blank line at the end, don't remove it. Global ROM seems to have 14 lines of code with 1 blank line at the end after this process.
Save the file, WinRAR will ask if you want to update the archive, permit it.
Your ROM is now fw-less. Enjoy.
► You bricked your phone?
Sorry, I can't help you if you messed something up. That's the disclaimer here. You do this with all liability to yourself.​
► Want to learn more?
• Everything About Anti Roll-back [Whyred]
• Redmi Note 5/Pro Miui ROMs without firmware [fw-less]​
► Should you be careful?
• I don't exactly know how far behind you can go, do that research yourself and let me know so I can update it here. But I'd recommend not going too far behind. If you go too far, even after following this process, your phone might end up bricking. Some ROMs are just too old.​
Click to expand...
Click to collapse
My file has three extra lines at the end difference from yours should i removed it also?
format("ext4", "EMMC", "/dev/block/bootdevice/by-name/cust", "0", "/cust");
package_extract_file("META-INF/com/xiaomieu/xiaomieu.sh", "/tmp/xiaomieu.sh");
run_program("/sbin/busybox", "sh", "/tmp/xiaomieu.sh", "dummy", "1", "/tmp/xiaomieu.sh");
pipo_nhoc said:
Which method that you used to unbrick the device, could you please share?
Click to expand...
Click to collapse
Sure it's this method
https://forum.xda-developers.com/re...nofficial-unbrick-harddricked-whyred-t3840687
The ROM linked in the OP is the official Xiaomi.eu MIUI 10.0.1 ROM, which contains the firmware-update folder, hence it's highly possible that it will trigger ARB4. OP, you'll save many users some time by either removing that link, or providing a link to a non-arb version of the ROM.
Does anyone know of a tool to check the ARB version in the ROM zip itself? Instead of flashing it on the device first and then checking via fastboot
Can I dirty flash the new MIUI 10 global stable over this rom?
Dr_TGP said:
Can I dirty flash the new MIUI 10 global stable over this rom?
Click to expand...
Click to collapse
No. Wipe clean.
pipo_nhoc said:
My file has three extra lines at the end difference from yours should i removed it also?
Click to expand...
Click to collapse
Don't do that. Also, verify if the rom isn't already fw-less, like Xiaomi.eu.
can you make fw-less for xiaomi eu weekly build?
i was looking for the exact same thread thank u

Problem with port on Mediatek 6580 kernel 3.18.35

Yesterday I made a port to a Doogee Shoot 2 (Mediatek 6580 with Kernel 3.18.35) from this ROM http://techboxlab.com/a9-lite-rom-for... I was pretty happy about the possibility of flashing it. Was a success, everything was working except a little detail: the device was lock and I made a call to see how the screen and sound was...the result? the phone goes crazy...I was rebooting the device. Once was on again I go to Play Store to update the apps...the phone goes to rest and when I unlock it, again this that show you in the video. What can it be? I followed to guides to do it and both are the same result, mixing both equal...
I thought that can be the gapps (the rom comes with gapps) so I flash over newer version, was the same. I don't know if it helps but here are some things, the flash takes a while (more than 10 minutes), and when the flash is over and I can reboot I have this: after the Unmount system line I get: "unmount of /system failed: no such volume"
the mount section of my updater script is:
ui_print(" = >>>>> Mount System <<<<< = ");
mount("ext4", "EMMC", "/dev/block/platform/mtk-msdc.0/by-name/system", "/system", "max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc");
ui_print(" = >>>>> Stating Flash Rom <<<<< = ");
package_extract_dir("system", "/system");
And the unmount system
ui_print("**************************************************");
ui_print(" = >>>>> Unmount System <<<<< = ");
unmount("/system");
set_progress(1.000000);
My youtube video with the example https://www.youtube.com/watch?v=ysgOy50-2ao
help please?
anyone?
AgustinH said:
anyone?
Click to expand...
Click to collapse
Try this guide https://forum.xda-developers.com/android/general/guide-how-to-port-nougat-based-roms-t3679512
This guide (another one) got deleted in the FB group. So here it is again: https://forum.xda-developers.com/an...uide-minimal-porting-guide-mtk-64bit-t3772641
Give it a go and see if it helps in anything porting related. Regarding the updater script, download on of the custom roms for your device and try using one of those updater scripts.

Categories

Resources