[Q&A] [GUIDE] [PORT] [ROM] All About Mediatek ROM Porting - Android Q&A, Help & Troubleshooting

Q&A for [GUIDE] [PORT] [ROM] All About Mediatek ROM Porting
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer. Thanks for understanding and for helping to keep XDA neat and tidy! :smile:

after unpack my boot.img with "MTK FirmwareAdapter Tool" i have in the folder:
1- rmdisk (folder)
2- kernel (file)
3- kernel_header (file)
4- ram_disk (file)
5- ram_disk.gz
6- ram_header (file)
Where is the zimage? Where is boot.img-ramdisk folder? How i doing:
"* Now Go back to the Rom folder and Take the boot.img and decompile it with any bootimg-unpack tool!
* Now delete the zimage and rename boot.img-ramdisk to PORT-Ramdisk
* Now Do the Same for Stock boot.img and open the folder named PORT-ramdisk and copy all the fil PORT-
ramdisk to boot.img-ramdisk of your Stock boot.img
* Now Go to boot.img-ramdisk and open init.rc" ?????????
thx
Click to expand...
Click to collapse

Port mtk6592 to mtk6589t
hi i try to port mtk6592 to mtk6589t and not working, you can help me?
Thanks

iphone 6 clone dead
hi i formate iphon6 clone using sp flash tool,now bootloader menu not opening even not charging. what can i do, please advice me.

sorry, i am new here.
I really doubt if this tutorial will work on Tablet Advan T5C.
I really want to Port MIUI Rom to this tablet. However, the developer is very rare for this vendor "Advan" so it's hard to get a Custom ROM.
What ROM of Tablet Vendor which can be ported to this spec?
8 "Inch IPS
MT6582
Mali 400
8 GB ROM
1 GB of RAM

Port MT6589 to MT6577
Thanks for the tutorial on first page.
Im alred try first metod but cellphone restart on CWM scren.
Now a gonna try secound metod.

Useful Post....
Tnx For Share.

teopro said:
after unpack my boot.img with "MTK FirmwareAdapter Tool" i have in the folder:
1- rmdisk (folder)
2- kernel (file)
3- kernel_header (file)
4- ram_disk (file)
5- ram_disk.gz
6- ram_header (file)
Where is the zimage? Where is boot.img-ramdisk folder? How i doing:
"* Now Go back to the Rom folder and Take the boot.img and decompile it with any bootimg-unpack tool!
* Now delete the zimage and rename boot.img-ramdisk to PORT-Ramdisk
* Now Do the Same for Stock boot.img and open the folder named PORT-ramdisk and copy all the fil PORT-ramdisk to boot.img-ramdisk of your Stock boot.img
* Now Go to boot.img-ramdisk and open init.rc" ?????????
thx
Click to expand...
Click to collapse
The zImage is the kernel file. boot.img-ramdisk is the main folder containing the zImage(kernel) and ramdisk, just you need rename the decompiled port boot.img to PORT-ramdisk, and your stock boot.img not rename folder.

I just want to ask how to fix this problem , I ported MT6589 to my MT6577 device, Seems there's no problem in flashing ROM but when its time to boot, it just hangs on the boot logo, it's not even trying to load bootanimation but rather it only flashes a white screen then it reboot to my recovery. Seems like I do something wrong?
My device is mp a818g duo
Kernel:3.4.0
Chipset: MT6577
Hope I receive help
---------- Post added at 03:57 PM ---------- Previous post was at 03:50 PM ----------
teopro said:
after unpack my boot.img with "MTK FirmwareAdapter Tool" i have in the folder:
1- rmdisk (folder)
2- kernel (file)
3- kernel_header (file)
4- ram_disk (file)
5- ram_disk.gz
6- ram_header (file)
Where is the zimage? Where is boot.img-ramdisk folder? How i doing:
"* Now Go back to the Rom folder and Take the boot.img and decompile it with any bootimg-unpack tool!
* Now delete the zimage and rename boot.img-ramdisk to PORT-Ramdisk
* Now Do the Same for Stock boot.img and open the folder named PORT-ramdisk and copy all the fil PORT-
ramdisk to boot.img-ramdisk of your Stock boot.img
* Now Go to boot.img-ramdisk and open init.rc" ?????????
thx
Click to expand...
Click to collapse
When you use android kitchen to decompile your boot.IMG then your kernel will named zimage, but when you use other unpack/repack tool for your boot.IMG, the equivalent of zimage in your decompiled boot.img is the files kernel and kernel header.
Click to expand...
Click to collapse

Xtreme Ornob Thanks
Thanks a lot for this extreame guide about Mediatek rom Porting

what is the tool download link, i am new

When I port by this guide I have problems, from 6582 to 6582
I have logo and then nothing when phone reboots after installing rom
I tried all things
changed kernel from stok to port rom and changed the lines in init.rc in stok rom and have the same result
Can some one help me?

iceman1966 said:
decompile the boot.img rom port and the boot.img of your stock rom. Replace the ramdisk rom port with ramdisk the stock rom. recompile and install the new boot.img.
Click to expand...
Click to collapse
I made that you write to me but situation is the same.
logo and nothing else
How to take the logcat when the phone goes to reboot after flashing the rom ?
I want to see what I made wrong?

query regarding porting from different versions
Hello xda.........i want to know the information about how to port the jellybean rom with kitkat to get kitkat in my phone.............
please explain me how to port to higher versions from our lower version of roms.............

Boot.img
im porting from a device to a device with different SoC.
i have followed instructions on this thread:
http://forum.xda-developers.com/showthread.php?t=2701283
i have done the steps and reached to the step where it says to unpack boot.img. i have unpacked the boot.img in both port and stock only to find the boot.img-ramdisk empty... what should i do now?

I want to know all about Porting
Hi sir Good day.
I want to know how to port a HTC one M8 ROM MTK6572 Chipset. Beacase I came from Samsung Dev. S5830 Galaxy Ace and its hard to understand how to flash ROM's of MTK's Devices. Please Reply Thanks in advance

camera degrades performance
nice tutor, i have sucessfully ported Lewa OS 5.0 rom from Lenovo S920 to my device HDC Galaxy S4 GT-I9500 Clone.
-MTK6589 Quad Core 1.2GHz
-2GB RAM (fake) 1GB RAM (real), 4GB ROM
-5.0inch HD IPS Screen
Display resulotion: 1280*720 pixel display, 320 dpi
GPU : PowerVR SGX 544MP
Build ID : JDQ39.I9500ZSUAMDF
Hardware : UNIVERSAL5410(exynos5) fake, MT6589
Model : GT-I9500
Build number : ALPS.JB2.MP.V1.26
Build date UTC : 20130904-125830
Android v : 4.2.2
Baseband v : MOLY.WR8.W1248.MD.WG.MP.V23.2013/07/25 04:17
Kernel v : 3.4.5 ([email protected]) (gcc version 4.6.x-google 20120106 (prerelease) (GCC))#1 SMP Wed Sep 4 20.55.23 CST 2013
LCD Driver IC : 1-nt35590_hd720_dsi_cmd_truly
all work perfectly but the problem is camera quality really degrades when using Lewa OS. with stock rom my back camera 13MP, when i used custom rom Lewa my back camera only 2MP. i try to instal lenovo super camera, but camera resolution still same only 2MP.
how can i fix it please help me.....!

can you help me I am trying to port the ROM from mt6592 to mt6582 and have problems.
Do you have guide how to make a port from mt6592 to mt6582?

just wanna ask if im doing right,thanks in advance
I am porting custom rom MT6572 to my device MT6582
I decompile boot.img(MT6572) and boot.img(MT6582"stock")
I copy all files from ramdisk(MT6572) and replace it to ramdisk(MT6582" stock)
I edit init.rc and edit what i need to edit and do it like this
#Create Chip Property
on early_property:ro.hardware=mt6572
setprop ro.mtk.hardware mt6582
on early_property:ro.hardware=mt6589
setprop ro.mtk.hardware mt6582
I add and edit those line on the init.rc, am I doing right boss?

Good day Sir,just wanna ask if i am doing right.
I am porting custom rom MT6572 to my device MT6582
I decompile boot.img(MT6572) and boot.img(MT6582"stock")
I copy all files from ramdisk(MT6572) and replace it to ramdisk(MT6582" stock)
I edit init.rc and edit what i need to edit and do it like this
#Create Chip Property
on early_property:ro.hardware=mt6572
setprop ro.mtk.hardware mt6582
on early_property:ro.hardware=mt6589
setprop ro.mtk.hardware mt6582
I add and edit those line on the init.rc, am I doing right boss?

Related

Port MiUi,Lewa,oppo ROM for mediatek

Now a days mediatek is a populer chipset among the low end android phones ! But many custom roms are possible in this Soc.
These tutorial ar for them who know about rom porting!
Porting MiUi to mediatek.
You have to take MiUi rom compalitable with your Soc.
Like
MT6577 to MT6575
MT6589 to MT6577
MT6582 to MT6572
Better is to port from the same SOc like MT6572 to MT6572
For porting MiUi,Lewa,Oppo
To port for MT6572 to MT6572 just copy and replace these files from your stock rom to port rom.
system/lib/modules
system/etc/firmware
system/user/keylayout/generic.kl
Done now decompile boot.img of your stock rom also the MiUi rom you are porting !
Now copy and replace int.rc to stock boot.img ramdisk folder from ramdisk folder of MiUi boot.img after decompiling.
You have to change the mount point of updater script of the rom you are porting.
Open updater script of port rom find these lines
format("ext4", "EMMC", "/dev/block/mmcblk0p5", "0");
mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/system");
Now change the mmcblkop_ with your phones partition.
To know about your phones mount point download partition table from google play!(system,data,each does not have the same mount point)
Done now again zip your rom and flash.
To port MiUi,Lewa,Oppo from different chip mentioned above and MT6582 to MT6582,MT6589 to MT6589
Copy and replace these files from stock rom to port rom
system/etc/firmware
system/lib/modules
system/lib/hw
system/usr
system/vendor
Now do the same work to boot.img and updater script ! Now zip your rom and flash!

[Guide ]How To Port MTK ROMs [For All Chipsets]

This guide is only for MTK! This will work from same chip to same chip for example MT6582 to MT6582 or MT6577 to MT6577
Some devices have different partitions to flash and the ROM you might flash can brick your phone. It can even hard brick your phone. So it is recommended that you do a ReadBack, ClockWorkMod Backup and MTK Droid Root & Tools backup. I am not responsible for bricked phones!!
What you need to port a ROM to your device [Your chipset to Your Chipset only]
1: A ROM to port [in .zip]
2: Your stock ROM [extracted with /system and build.prop]
How To Port ROMs to your Phone:
Extract the ROM to port and you will have these main things:
META-INF
System
boot.img.
If you have them then you are ready for next step.
Open /system folder of stock and rom to port.
Open bin folder of stock ROM and copy these files:
pq
vold
Now replace these files in ROM to Port's /System/Bin folder.
Open lib folder of Stock ROM and get these files:
libcamalgo.so
libcamdrv.so
libcameracustom.so
libdpframework.so
libsensorservice.so
libsync.so
libvcodecdrv.so
Replace all the files mention above to ROM to Port's /system/lib folder.
Now open Stock ROM's /system/etc/ folder and copy these files:
apns.conf.xml
vold.fstab
vold.fstab.nand
Now replace these files in ROM to port's /system/etc folder.
Delete these folders from ROM to Port
/System/vendor/
/System/lib/hw
/System/lib/modules/
/System/etc/WiFi
/System/etc/Firmware
Replace these folders from Stock ROM to ROM to Port:
/System/lib/hw/
/System/lib/modules//System/etc/WiFi/
/System/etc/Firmware/
/System/vendor/
The final step! Press back button to go to the main folder where you have the Stock ROM. Copy boot.img [From Stock ROM]and replace it with the ROM to Port's.
if I helped you hit Thanks button....
Must the two ROMs be the same Android version or doesn't mater?
Any version of Android but the chip should be same
Ex: mtk-6592 to mtk-6592

[GUIDE][PORT]How to Port LolliPop and MarshMallow Based ROMs on Any Device[Qualcomm]

Hey Guyzzz...... I am Here to provide you the Guide on How to port Lollipop ROMs and MarshMallow ROMs on any Device
New Year Gift For You Guyz​First Guide on XDA to port ROMs above 5.0.2 (Qualcomm Processor)​
Code:
KEEP THESE POINTS IN MIND
This guide wont make you a full fledged dev.
It teaches you the basics of porting ROMS.
If anything happens to your device I AM NOT RESPONSIBLE for IT ! try it on your own risk !
Some Basic things u need to Know before Porting
Code:
The rom which you want to port for your device is named here as [B]PORT[/B]
The rom which is already working for your device is called here as [B]BASE[/B]
Download Some Necessary Files From this Post​
1st extract ur base cm,aosp,etc rom on one folder
2nd extract ur Port rom in one folder
Now you can see
boot.img
file_contexts
META-INF
system.new.dat (compressed /system)
system.patch.dat
system.transfer.list
Click to expand...
Click to collapse
Step 1:​Ubuntu guide
Now we need to decompress .dat to ext4 img
Open terminal and
Now enter this command
Code:
./sdat2img.py system.transfer.list system.new.dat system.img
By running this command u can see a system.img
Step 2 :​decompress ext4 img to output folder
Now we will mount system.img
Enter this command
Code:
sudo mount -t ext4 -o loop system.img output/
Now go to output folder and now u can see all folder and apk like a KitKat rom
Now do the same with port rom
Step 3:​Now we will port
Delete some folders from base
Code:
base/system/app
base/system/fonts
base/system/framework
base/system/media
base/system/priv-app
and paste from port
Code:
port/system/priv-app
port/system/app
port/system/fonts
port/system/framework
port/system/media
Now copy some important permissions and init.d files
Code:
port/system/etc/permissions
platform.xml
handheld_core_hardware.xml
handheld_hardware.xml
to base /base/system/etc/permissions
now go to port/system/etc/init.d
and copy
Code:
00banner
to base/system/etc/init.d
Now open the build.prop of both ROMS. Replace the values infront of following
lines in base from port
change frm port to base
Code:
ro.build.id=
ro.build.display.id=
ro.build.version.release=
ro.product.model=
ro.config.ringtone=
ro.config.notification_sound=
ro.config.alarm_alert=
base/system/build.prop
port/system/build.prop
Edit meta inf
Now go to metainf/com/google/android
And open updater-script with notepad++
And u can add
Code:
ui_print (" ur text");
and save it
Now we need to again compress rom
Now enter this command
Code:
./make_ext4fs -T 0 -S file_contexts -l 1073741824 -a system system_new.img output/
Now u can see ur system_new.img
Step 4:​ now we need to compress it back to .dat
Now enter command
Code:
./rimg2sdat my_new_system.img
Now u can see system.new.dat
Now just zip the ROM and flash
Downloads​
Click here for sdat2img.py
Click here for make_ext4fs
Click here for rimg2sdat​
Now Download all these tools and paste it to ur base and port rom directory then follow instructions to port lollipop roms
Credits
@xpirt
@adityaupreti for guide​If I forgot anyone PM me
A Thanks on our Posts will be Helpful For OUR Efforts ..... Please.....
If u have any queries in Porting.....AdityaUpreti and Me are always here to help you......
Stay Blessed ....... Happy New Year 2K16​
Reserved for faq
Reserved
For windows.... Use this Tool http://sourceforge.net/projects/ext2read/files/
Credits: @neonkat for sharing
Cool gonna try it out, thanks man
Bro I want for to port on windows
Finally its here . search lot fr this.. Btw dz guide ll work on snapdragon 810.. E.g. i use 1+2 so . can i port another sp810 roms?
adityaupreti said:
Reserved for faq
Click to expand...
Click to collapse
Bro please tell me how to do this in windows
neelsolanki said:
Finally its here . search lot fr this.. Btw dz guide ll work on snapdragon 810.. E.g. i use 1+2 so . can i port another sp810 roms?
Click to expand...
Click to collapse
If it meet same specs u can port rom
---------- Post added at 09:29 PM ---------- Previous post was at 09:28 PM ----------
salahXDA6805 said:
Bro please tell me how to do this in windows
Click to expand...
Click to collapse
Soon update thread with Windows
adityaupreti said:
If it meet same specs u can port rom
---------- Post added at 09:29 PM ---------- Previous post was at 09:28 PM ----------
Soon update thread with Windows
Click to expand...
Click to collapse
Been looking for this too, thanks for this, will try soon.
[Q]
Is there any most practical way to compare 2 device spec?
NeoLogY said:
Been looking for this too, thanks for this, will try soon.
[Q]
Is there any most practical way to compare 2 device spec?
Click to expand...
Click to collapse
Try 91mobiles.com and compare mobiles there u can see the similarities and differences. ... or gsmarena [emoji6] [emoji571] [emoji571] [emoji571]
........Press Thanks .......
I ported ressurection remix 5.6 for the Moto G 2014 to my LG G3 Beat using an official CM13 base and it bootloops with this guide
Sent from my LG-D722 using Tapatalk
the same here, bootlooping..
Is it almost the same process on windows?
Carlyle_f said:
I ported ressurection remix 5.6 for the Moto G 2014 to my LG G3 Beat using an official CM13 base and it bootloops with this guide
Sent from my LG-D722 using Tapatalk
Click to expand...
Click to collapse
This is where debugging process happen. Log is your best friend now.
yakie47 said:
the same here, bootlooping..
Click to expand...
Click to collapse
I want to port rom for my Spice MI 445 MSM8610 clone of moto e.
I found many custom rom for moto e but didn't know how to port them for my device.
Sent from my Spice Mi-445 using xda Forums PRO
Eklavya Prasad said:
I want to port rom for my Spice MI 445 MSM8610 clone of moto e.
I found many custom rom for moto e but didn't know how to port them for my device.
Sent from my Spice Mi-445 using xda Forums PRO
Click to expand...
Click to collapse
Sry bt u can't port Roms from moto e to ur device
---------- Post added at 06:20 PM ---------- Previous post was at 06:19 PM ----------
yakie47 said:
the same here, bootlooping..
Click to expand...
Click to collapse
kindly give some base ROM info and port ROM info
Also tell base ROM device and port device
Base name port name
i'm porting samsung touchwiz A500fu rom to the chinese version one samsung A5000 base rom, the phone boots up but stuck in samsung boot screen for ever
VigneshS007 said:
Hey Guyzzz...... I am Here to provide you the Guide on How to port Lollipop ROMs and MarshMallow ROMs on any Device
New Year Gift For You Guyz​First Guide on XDA to port ROMs above 5.0.2 (Qualcomm Processor)​
Code:
KEEP THESE POINTS IN MIND
This guide wont make you a full fledged dev.
It teaches you the basics of porting ROMS.
If anything happens to your device I AM NOT RESPONSIBLE for IT ! try it on your own risk !
Some Basic things u need to Know before Porting
Code:
The rom which you want to port for your device is named here as [B]PORT[/B]
The rom which is already working for your device is called here as [B]BASE[/B]
Download Some Necessary Files From this Post​
1st extract ur base cm,aosp,etc rom on one folder
2nd extract ur Port rom in one folder
Now you can see
Step 1:​Ubuntu guide
Now we need to decompress .dat to ext4 img
Open terminal and
Now enter this command
Code:
./sdat2img.py system.transfer.list system.new.dat system.img
By running this command u can see a system.img
Step 2 :​decompress ext4 img to output folder
Now we will mount system.img
Enter this command
Code:
sudo mount -t ext4 -o loop system.img output/
Now go to output folder and now u can see all folder and apk like a KitKat rom
Now do the same with port rom
Step 3:​Now we will port
Delete some folders from base
Code:
base/system/app
base/system/fonts
base/system/framework
base/system/media
base/system/priv-app
and paste from port
Code:
port/system/priv-app
port/system/app
port/system/fonts
port/system/framework
port/system/media
Now copy some important permissions and init.d files
Code:
port/system/etc/permissions
platform.xml
handheld_core_hardware.xml
handheld_hardware.xml
to base /base/system/etc/permissions
now go to port/system/etc/init.d
and copy
Code:
00banner
to base/system/etc/init.d
Now open the build.prop of both ROMS. Replace the values infront of following
lines in base from port
change frm port to base
Code:
ro.build.id=
ro.build.display.id=
ro.build.version.release=
ro.product.model=
ro.config.ringtone=
ro.config.notification_sound=
ro.config.alarm_alert=
base/system/build.prop
port/system/build.prop
Edit meta inf
Now go to metainf/com/google/android
And open updater-script with notepad++
And u can add
Code:
ui_print (" ur text");
and save it
Now we need to again compress rom
Now enter this command
Code:
./make_ext4fs -T 0 -S file_contexts -l 1073741824 -a system system_new.img output/
Now u can see ur system_new.img
Step 4:​ now we need to compress it back to .dat
Now enter command
Code:
./rimg2sdat my_new_system.img
Now u can see system.new.dat
Now just zip the ROM and flash
Downloads​
Click here for sdat2img.py
Click here for make_ext4fs
Click here for rimg2sdat​
Now Download all these tools and paste it to ur base and port rom directory then follow instructions to port lollipop roms
Credits
@xpirt
@adityaupreti for guide​If I forgot anyone PM me
A Thanks on our Posts will be Helpful For OUR Efforts ..... Please.....
If u have any queries in Porting.....AdityaUpreti and Me are always here to help you......
Stay Blessed ....... Happy New Year 2K16​
Click to expand...
Click to collapse
When I use command ./sdat2img.py system.transfer.list system.new.dat system.img it shown no such file or directory.
Bro need for windoes
MyAnand13 said:
When I use command ./sdat2img.py system.transfer.list system.new.dat system.img it shown no such file or directory.
Click to expand...
Click to collapse
Try python sdat2img.py system.transfer.list system.new.dat system.img
Sent from my LG-D722 using Tapatalk
---------- Post added at 10:40 AM ---------- Previous post was at 10:40 AM ----------
salahXDA6805 said:
Bro need for windoes
Click to expand...
Click to collapse
Google cgwyn
Sent from my LG-D722 using Tapatalk

[GUIDE] Make a kernel for G531F variant

So, I'm doing this tutorial due to the trial and error I got.
Prerequisites:
Ubuntu or any linux-based os with the right packages installed
Source code from the kernel
Backup of you boot partition
These tools here
Patience
1) The first thing you want to do is to do a backup of your boot partition.
Code:
adb shell
dd if=/dev/block/mmcblk0p9 of=/sdcard/boot.img
2) Download the source code from here, extract it and place it somewhere. I placed it in /home/fabio/Documentos/Kernel/sourcecode
3) Download a toolchain, I downloaded "aarch64-linux-android-4.8" from google and placed in "/home/<your username>/Documentos/Kernel/aarch64-linux-android-4.8"
4) Go to your kernel source code and find the file "Makefile", open it and change CROSS_COMPILE= to say the place where you stored the toolchain "/home/<your username>/Documentos/Kernel/aarch64-linux-android-4.8" + "/bin/aarch64-linux-android-"
5) Now that you are done setting up the stuff, open a console and navigate to your kernel source code root and type
Code:
make
make pxa1908_grandprimevelte_eur_defconfig
make -j#
# is the number of cores + 1
6) While that runs, go to where you stored those mkbootimg tools and unpack that boot.img you backed up
7) Once the kernel building is complete. Go to your kernel folder and navigate to arch/arm64/boot and copy the file "Image.gz"
8) Download bless or an Hex Editor of your liking and open the following files: boot.img (the original boot), Image.gz, boot.img-zImage.
Search on the "boot.img-zImage" for 1F 8B 08 and copy everything before then on your Image.gz place what you copied and save it as a different file otherwise it will fail to save.
9) Go to your mkbootimg folder and where you stored the unpacked files and build one boot.img with the following command
Code:
./mkbootimg --kernel image2.gz --ramdisk boot.img-ramdisk.gz --dt boot.img-dt --signature boot.img-signature -o boot2.img
10) Flash the boot2.img using any software you want!
THIS MIGHT NOT WORK! If it doesn't you can send me a DM! I will be retouching this post again and make it prettier adding pictures and stuff but for now I can't do much!
If you know a better way of doing this please say in the replies! I will be building a kernel for this device soon enough
RESERVED
Can you please upload link of custom kernel
I'm still trying to do a kernel with new features, but don't know what to add yet. Trying to make Init.d support without 3rd party apps!
EDIT1: I give up! My phone is too much trouble and since SAMSUNG doesn't care about it neither do I anymore! Try to build the kernel yourself and tweak it as you like! Make a script to automate this process to be easier! Good luck! Anything you need just say
Can you help this guy for porting kernel source code http://forum.xda-developers.com/grand-prime/general/developers-discussion-sm-g531f-custom-t3444598
fabiossilva21 said:
So, I'm doing this tutorial due to the trial and error I got.
Prerequisites:
Ubuntu or any linux-based os with the right packages installed
Source code from the kernel
Backup of you boot partition
Degas mkbootimg tools
Patience
1) The first thing you want to do is to do a backup of your boot partition.
Code:
adb shell
dd if=/dev/block/mmcblk0p9 of=/sdcard/boot.img
2) Download the source code from here, extract it and place it somewhere. I placed it in /home/fabio/Documentos/Kernel/sourcecode
3) Download a toolchain, I downloaded "aarch64-linux-android-4.8" from google and placed in "/home/fabio/Documentos/Kernel/aarch64-linux-android-4.8"
4) Go to your kernel source code and find the file "Makefile", open it and change CROSS_COMPILE= to say the place where you stored the toolchain "/home/fabio/Documentos/Kernel/aarch64-linux-android-4.8" + "/bin/aarch64-linux-android-"
5) Now that you are done setting up the stuff, open a console and navigate to your kernel source code root and type
Code:
make
make pxa1908_grandprimevelte_eur_defconfig
make -j#
# is the number of cores + 1
6) While that runs, go to where you stored degas-mkbootimg tools and unpack that boot.img you backed up
7) Once the kernel building is complete. Go to your kernel folder and navigate to arch/arm64/boot and copy the file "Image.gz"
8) Download bless (Hex Edit) and open the following files: boot.img (the original boot), Image.gz, boot.img-zImage.
Search on the "boot.img-zImage" for 1F 8B 08 and copy everything before then on your Image.gz place what you copied and save it as a different file otherwise it will fail to save.
9) Go to your degas-mkbootimg folder and where you stored the unpacked files and build one boot.img with the following command
Code:
./degas-mkbootimg --kernel image2.gz --ramdisk boot.img-ramdisk.gz --dt boot.img-dt --signature boot.img-signature -o boot2.img
10) Flash the boot2.img using any software you want!
THIS MIGHT NOT WORK! If it doesn't you can send me a DM! I will be retouching this post again and make it prettier adding pictures and stuff but for now I can't do much!
If you know a better way of doing this please say in the replies! I will be building a kernel for this device soon enough
Click to expand...
Click to collapse
i follow this step and build kernel after flash boot.img phone not booting
my boot.img size is 8.2MB (image.gz size 6.5MB) where stock size is 8MB
is problem with size?
sorry for my bad english
How did you flash the boot.img?
fabiossilva21 said:
How did you flash the boot.img?
Click to expand...
Click to collapse
using odin
What changes did you make to the kernel?
fabiossilva21 said:
What changes did you make to the kernel?
Click to expand...
Click to collapse
Add governors
Other setting same as stock
If i build with stock setting without any changes then kernel boot but if i change something then its stuck on Samsung logo
Sorry, I can't really help you... I no longer work with Grand prime... switched to a J5
fabiossilva21 said:
Sorry, I can't really help you... I no longer work with Grand prime... switched to a J5
Click to expand...
Click to collapse
Ok
Noice

Is Kitchen tools kit custom ROM is the good choice?

Hello,
I've got a LeelBox S1 with CPU Model S905X Quad-Core Cortex-A53 1Go / 8Go. I would like to know if Kitchen tools kit is the good choice. I Tried to edit some custom ROMs which are available in the forum. Each time I've the same error when Kitchen extract the zip file of the ROM :
Creating working folder WORKING_013117_152436 ...
Extracting ROM from ZIP file ...
Error: No system folder found!
Press Enter to continue​
Any idea what I missed
Thanks for your help

Categories

Resources