MTK kali nethunter kernel porting problem - Android Software/Hacking General [Developers Only]

hey guys, im new to porting new kernels to my phone
i flashed kali nethunter on my MTK device but when i try to flash the kernel it fails when it comes to decompressing boot.img and it show this error (Unpacking boot image failed) using this command :
"$bin/bootimg" xvf boot.img "$split_img"
i tried to flash this kernel in both stock and custom rom but the same error appears
i think nethunter kernel installer isn't made for MTK devices because when i decompressed boot.img it listed files that's not present in the installer like this one (boot.img-ramdisk) it only shows compressed (kernel.gz) and (ramdisk.gz) and (cpiolist) and (bootinfo) and (initrd) folder.
i saw some going modifies boot.img to make a flashable compatible kernel of nethunter depending on given boot.img so
pleaaaaaase guys help me in this situation im really excited to test my alfa in kali nethunter :crying: :crying: :crying:
my phone:
Gionee M5 Lite
kernel version: 3.18.19
rom: lineage os 14.1
nethunter generic-arm64-kalifs-full-rolling-2017.11-18-1618
boot.img:
htt ps: // drive.goo gle. com /file/d/1FN5ogaRRboCKS2ap2_dzYpLdxenJjbse/view?usp=sharing

Related

compile google sources with samsung ICS

Hi,
i'm trying to compile google sources version 4.0.4 with samsung sources from opensource samsung
From samsung sources i've only used the platform files. I've done all the steps that are in the platform readme:
How to build Mobule for Platform
- It is only for modules are needed to using Android build system.
- Please check its own install information under its folder for other module.
[Step to build]
1. Get android open source.
: version info - Android gingerbread 4.0.4
( Download site : source android)
2. Copy module that you want to build - to original android open source
If same module exist in android open source, you should replace it. (no overwrite)
# It is possible to build all modules at once.
3. Check module is in 'build\core\user_tags.mk'
If not, you should add your module name in it.
ex1) external\libjpega : Write "libjpega \" into "build\core\user_tags.mk"
ex2) external\libexifa : Write "libexifa \" into "build\core\user_tags.mk"
4. In case of 'external\bluetooth',
you should add following text in 'build\target\board\generic\BoardConfig.mk'
BOARD_HAVE_BLUETOOTH := true
BOARD_HAVE_BLUETOOTH_BCM := true
5. excute build command
./build.sh user
The command user was ./build.sh eng
Before running this command i've installer jdk 6 and follow the steps from android initializing
the ./build.sh eng run with success and after this i've run the make.
Some hours later i've got a new folder "OUT", inside there is a system folder but i've tryed to flash this folder with odin
and no success.
What am i doing wrong?
Thanks.
Trying to build the kernel + modules?
If i understand what your trying to do, Install new kernel and modules?
!!!!!Before you try this, do some research for your device and make sure this is the correct action!!!!!
you are looking for a file called: zImage
It should be in <build path>/arch/arm/boot/
To install the new kernel, you put your device into fastboot
Code: adb reboot-bootloader
Then you can install the new kernel:
Code: fastboot flash zimage /<path to your zImage file>/zImage
Then you can boot your device and manually copy over the modules.
Note: I didn't see in your steps where you mentioned configuring the kernel, are you doing this?
Thanks for your reply.
the kernel i've already compiled like you mentioned and it is ok i've flashed the zImage.
But there is another part that is the platform module that corresponds to the system.
When you have a Rom there are 3 things inside:
- boot.img that has the zImage (kernel)
- meta-inf
- system
i'm changing the code in one file that corresponds to the nfc part and them compile the samsung sources
and google sources to get that system.
after compile the is one folder out that has system.img but i can't flash this .img file the mobile phone gets like a stone :S
All Black!
Please describe the process you are using to flash the system.img.
Have you though about just copying over the modified files?
Also, if you could create a step by step list of your process, maybe we can figure out what's going wrong.
i've compiled the google+samsung sources and this created the system.img.
Then i used Heimdall to choose only system to flash and It didn't work.
i've tryed also to change only the nfc.apk file put it in the app folder tryed to flash the ROM (in this case from Cyanogenmod) and it didn't work.
Thanks.
pec0 said:
i've compiled the google+samsung sources and this created the system.img.
Then i used Heimdall to choose only system to flash and It didn't work.
i've tryed also to change only the nfc.apk file put it in the app folder tryed to flash the ROM (in this case from Cyanogenmod) and it didn't work.
Thanks.
Click to expand...
Click to collapse
have you tried to remove and install your nfc.apk using adb rather than trying to flash the entire rom? I would think all you need to do is mod the kernel, flash the kernel, then copy over any modules and replace the nfc.apk.

[Solved] Kernel from source on 4.2.2

Hi,
I'm currently trying to build a kernel for my GT-P5110. I have a stock Android 4.2.2 which I downloaded from sammobile. I also downloaded the kernel from Samsung Open Source. I've use split_bootimg.pl to get the ramdisk from the boot.img and mkbootimg to make a boot.img from my zImage build successfully and the ramdisk. The problem is, when I flash my boot.img, I get stuck on the Samsung Galaxy Tab 2 logo even if I use the android_espresso10_omap4430_r02_user_defconfig which is suggested by Samsung.
Is there anyone able to sucessfully flash this kernel on his device?
Update: It seems like the defconfig file included in the Samsung Open Source contains some error.
If you want a working defconfig file use this one: http://forum.xda-developers.com/showpost.php?p=37685672&postcount=12

(GUIDE)(PORT CM 12.1 ) MTK6592 CM 12.1 PORTING GUIDE (Only For Porters) :)

MT6592 CM 12.1 PORTING GUIDE
Lots of people asked me how i ported cm 12.1 from @fire855's compiled rom for kingzone k1 Turbo
First of all huge thanks to @fire855 and other Dev who helped him for bringing cm 12.1 on mt6592
Give support to him via pressing thanks or Donate , here is it's Link : http://forum.xda-developers.com/and...od-12-kingzone-k1-turbo-t3119908#post61000671
Requirements :
1. Stock Rom KK
2. Working Good Custom Recovery
3. Good Porter and Mind
Lets Start This Short Guide :
1. Download Latest Cm 12.1 from above link
2. Extract in a new folder
3. Use this tool LInk : http://forum.xda-developers.com/android/development/tool-convert-folder-to-ext4-format-t3099237
unpack .dat file and copy extracted system folder in new folder as stated in step 2.
4. Using @michfood's tool (link : http://forum.xda-developers.com/showthread.php?t=2036528)
change Kernel and Do necessary changes acc. to your stock's ramdisk
5. Copy new boot.img that created in step 4 and replace in new folder as stated in step 2.
6. From stock kk rom ...........extract libaudio.primary.default.so (system/lib) and modem.img (system/etc/firmware) nd replace in cm 12.1 's rom ................ in the same location
7. Delete meta-inf folder of cm 12.1's rom and extract this (link : https://www.sendspace.com/file/vnf0gi)
8. Open meta-inf's updater-script in notepad++ and change mountpoint of system acc. to your's phone
9. Pack the folder as in zip format and flash via recovery
( meta-inf, install ,system, boot.img, file context these files must there in zip )
10. Voila Rom booted .............if not comment
If Rom Booted ..............Follow this steps :
1. Download this apk (link : http://forum.xda-developers.com/showthread.php?t=2524485)
2. Go to Settings>developer>enable root and install apk from step 1
3. Open app and Set as permissive ,reboot Your device
4. Voila your wifi,bluetooth etc will start working, even Dual Sim
5. If you faced basedband unknown that mean restore your imei
6. For Home Key Bug , Edit generic.kl and mtk-kpd.kl (system/user/keylayout)
7. For Storage Bug, Edit Framework-res.apk and set sdcard1 as primary and edit boot's ramdisk MT6592.rc, fstab
8. For Other Bugs, Let Me Know
Notice : Always give thanks and link of @fire855's Rom Link
Credits : everyone (who's name i added in this guide and there's tools )
​
@[email protected] Thanks for a great guide, I was able to succesfully port the rom and it booted as well and after setting the selinux to permission my sims also started working but mic is not working, my device is MT6582 (Intex Aqua Speed). I have a working CM11 already ported for my device which is working perfectly fine. Also the soft keys (capacitive keys are not working nor even the power button). Please advise...
contactwajeeh said:
@[email protected]. . . . but mic is not working . . . .
Click to expand...
Click to collapse
The microphone is also not working in all apps (except Telephone where it work's fine) in the original CM12.1 by fire855 for the Kingzone K1. (The Rom this Porting Guide is based on).
That could be part of the problem.
Dominic
G-GFFD said:
The microphone is also not working in all apps (except Telephone where it work's fine) in the original CM12.1 by fire855 for the Kingzone K1. (The Rom this Porting Guide is based on).
That could be part of the problem.
Dominic
Click to expand...
Click to collapse
But its not working in calls as well. BTW I am using @moonrotation build as my base. I haven't asked for permissions to port it yet. But that should be fine as far as I dont do the public release of it.
What necessary changes i must do in ramdisk?help
contactwajeeh said:
But its not working in calls as well. BTW I am using @moonrotation build as my base. I haven't asked for permissions to port it yet. But that should be fine as far as I dont do the public release of it.
Click to expand...
Click to collapse
currently mic problem is there ....wait for fixes
contactwajeeh said:
@[email protected] Thanks for a great guide, I was able to succesfully port the rom and it booted as well and after setting the selinux to permission my sims also started working but mic is not working, my device is MT6582 (Intex Aqua Speed). I have a working CM11 already ported for my device which is working perfectly fine. Also the soft keys (capacitive keys are not working nor even the power button). Please advise...
Click to expand...
Click to collapse
edit keylayout's genric.kl etc
mirrr46 said:
What necessary changes i must do in ramdisk?help
Click to expand...
Click to collapse
like some some extra lines der in urs .
Tried to port this, Device reboots right after vendor logo
I compare stock Ramdisk with CM12. There are no diff. At end both have same values. I changed Kernel and Kernel Header
I changed the updater script so it fits to my partition. It gave me strange errors:
lsetfilecon of /system/lost+found to ubject_r:system_file:s0 failed: No such file or directory
m_file:s0 failed: Operation not supported on transport endpoint
Error flashing Zip : Failed
Updating partition details...
Click to expand...
Click to collapse
Also @michfood's tool just ain't work here, i took the v4 for my x64 win8.1. The Program is unable to extract the Ramdisk path, so i was forced to use "MTK Firmware Adapter Tool"
Recovery:TWRP 2.8.1.0
SoC:MT6592
Device: Doogee DG550
Traace said:
Tried to port this, Device reboots right after vendor logo
I compare stock Ramdisk with CM12. There are no diff. At end both have same values. I changed Kernel and Kernel Header
I changed the updater script so it fits to my partition. It gave me strange errors:
Also @michfood's tool just ain't work here, i took the v4 for my x64 win8.1. The Program is unable to extract the Ramdisk path, so i was forced to use "MTK Firmware Adapter Tool"
Recovery:TWRP 2.8.1.0
SoC:MT6592
Device: Doogee DG550
Click to expand...
Click to collapse
1. don't touch kernel header....change only kernel
2. u should try other recovery like philz
3. delete lost and found folder if present
4. use my meta-inf only....just change mountpoint of system........it seems u need good recovery with lp supported or philz recovery :fingers-crossed:
Thanks for guide.
My camera does not work and gallery does not see SD card.
How to fix it?
mirrr46 said:
Thanks for guide.
My camera does not work and gallery does not see SD card.
How to fix it?
Click to expand...
Click to collapse
1. camera icon in launcher is issue (for mt6592)
2. for storage...fixes r from mt6592.rc in this file read proper sysmlink and do changes acc. to it ,decompile framework-res.apk....set sdcard1 as primary ,fstab changes also needed
Enforcing to Permissive
Does anyone know how to make selinux permissive without any app,I tried to change ro.build.selinux and set it to 0 but it didn't work...does anyone know what to edit in ramdisk to make selinux permissive.?
Traace said:
Tried to port this, Device reboots right after vendor logo
I compare stock Ramdisk with CM12. There are no diff. At end both have same values. I changed Kernel and Kernel Header
I changed the updater script so it fits to my partition. It gave me strange errors:
Also @michfood's tool just ain't work here, i took the v4 for my x64 win8.1. The Program is unable to extract the Ramdisk path, so i was forced to use "MTK Firmware Adapter Tool"
Recovery:TWRP 2.8.1.0
SoC:MT6592
Device: Doogee DG550
Click to expand...
Click to collapse
I'm still struggling to port this rom to DG550.
1. The tool you used to extract the kernel does not work in Windows 8.1 and Windows 10 (I got empty RAMDISK folder). So I switched back to Windows 7 and it worked well.
2. Compared both Ramdisk folders in Stock DG550 Kitkat and Stock Kingzone K1 Kitkat boot.img's.
There is no difference except in ueventd.rc file. I tried to mix DG550 kernel and Kingzone Z1 stock Ramdisk with DG550 Kitkat rom. It didn't boot at first. The problem was in ueventd.rc file. See line 152 (Mali Node). After replacing ueventd.rc file from DG550 ramdisk it booted and worked well (stock kitkat rom). So both the stock ramdisks are identical if ueventd.rc file is replaced.
3. But it fails when porting the boot.img for CM12.1. Theoretically CM12.1 ramdisk should work with DG550 kernel for CM12.1 rom without any changes (except ueventd.mt6592.rc). It does not pass the boot logo.
4. Also I noticed that there's some issue in sbin folder in ramdisk.
ADev_28 said:
Does anyone know how to make selinux permissive without any app,I tried to change ro.build.selinux and set it to 0 but it didn't work...does anyone know what to edit in ramdisk to make selinux permissive.?
Click to expand...
Click to collapse
/system/bin/setenforce 0
From any root terminal.
Thanks,
1. But i did port for mtk6582 (camera unfortunelty has stop)
chanaka89 said:
I'm still struggling to port this rom to DG550.
1. The tool you used to extract the kernel does not work in Windows 8.1 and Windows 10 (I got empty RAMDISK folder). So I switched back to Windows 7 and it worked well.
2. Compared both Ramdisk folders in Stock DG550 Kitkat and Stock Kingzone K1 Kitkat boot.img's.
There is no difference except in ueventd.rc file. I tried to mix DG550 kernel and Kingzone Z1 stock Ramdisk with DG550 Kitkat rom. It didn't boot at first. The problem was in ueventd.rc file. See line 152 (Mali Node). After replacing ueventd.rc file from DG550 ramdisk it booted and worked well (stock kitkat rom). So both the stock ramdisks are identical if ueventd.rc file is replaced.
3. But it fails when porting the boot.img for CM12.1. Theoretically CM12.1 ramdisk should work with DG550 kernel for CM12.1 rom without any changes (except ueventd.mt6592.rc). It does not pass the boot logo.
4. Also I noticed that there's some issue in sbin folder in ramdisk.
Click to expand...
Click to collapse
Please let us know if u can let it boot
Ramdisk sBin shoudn't be a problem, if they really cause trouble, try copy the missing files from base dg550 kk to cm12
[email protected] said:
1.
Click to expand...
Click to collapse
Thank you very much... Your guide was very appreciated... Work like a charm..
I used the device MT6592 - BLU VIVO IV of the my friend for port CM12.1
Sent from my LIFE PLAY X KK using XDA Free mobile app
lopestom said:
Thank you very much... Your guide was very appreciated... Work like a charm..
I used the device MT6592 - BLU VIVO IV of the my friend for port CM12.1
Sent from my LIFE PLAY X KK using XDA Free mobile app
Click to expand...
Click to collapse
congo
Traace said:
Please let us know if u can let it boot
Ramdisk sBin shoudn't be a problem, if they really cause trouble, try copy the missing files from base dg550 kk to cm12
Click to expand...
Click to collapse
mirrr46 said:
1. But i did port for mtk6582 (camera unfortunelty has stop)
Click to expand...
Click to collapse
seems storage bug...u need to fix storage .............check guide and comments
chanaka89 said:
I'm still struggling to port this rom to DG550.
1. The tool you used to extract the kernel does not work in Windows 8.1 and Windows 10 (I got empty RAMDISK folder). So I switched back to Windows 7 and it worked well.
2. Compared both Ramdisk folders in Stock DG550 Kitkat and Stock Kingzone K1 Kitkat boot.img's.
There is no difference except in ueventd.rc file. I tried to mix DG550 kernel and Kingzone Z1 stock Ramdisk with DG550 Kitkat rom. It didn't boot at first. The problem was in ueventd.rc file. See line 152 (Mali Node). After replacing ueventd.rc file from DG550 ramdisk it booted and worked well (stock kitkat rom). So both the stock ramdisks are identical if ueventd.rc file is replaced.
3. But it fails when porting the boot.img for CM12.1. Theoretically CM12.1 ramdisk should work with DG550 kernel for CM12.1 rom without any changes (except ueventd.mt6592.rc). It does not pass the boot logo.
4. Also I noticed that there's some issue in sbin folder in ramdisk.
Click to expand...
Click to collapse
i don't think so....again try and don't touch ramdisk
[email protected] said:
congo
seems storage bug...u need to fix storage .............check guide and comments
i don't think so....again try and don't touch ramdisk
Click to expand...
Click to collapse
How to solve storage bug??
Device booted.Not able to mount/access storage. ??

Android Magic not found in boot.img

I have compiled honor 4c chm-u01 kernel source and now I have zImage file
i'm trying to unpack stock boot.img but I got this error:
Android Magic not found in boot.img
I'm using Ubuntu 14.04 and I tried many softwares like AIK-Linux, Android.Image.Kitchen, CarlivImageKitchen-Linux. but the result is always same and I got the same error.
Any help would be appreciated.

[Completed] zimage kernel, how to flash it correctly??

Hello all,
Well, I just start to compile a kernel source for my Homtom HT17 (I need UVC support).
I found a source code (google HT17 kernel git)
and I compile it with success (I hope) on arm architecture (if I am not wrong, actual rom didn't use aarch64 even if the mt6737M is 64 bits)
So I have a zimage and try to flash it.
So I try to use kitchen and I am able to get to things : a new zip update that I made from a boot.img/system.img from a stock rom and I try to flash it with twrp but I had an error message (something wrong with META-INF\com\google\android\update-script)
Then I try to flash only the boot.img I made with the zimage with twrp. The phone loop at boot... (I restore it with mt flash tool and the rom I had)..
So I am very frustrated, 'cause I spent a lot of time to be able to compile the kernel...
I search a lot on Internet how to deploy correctly my kernel zimage but as now I am not able to get it running!
The problem is like I am newbies in kernel build, I dont know if my process is incorrect or my kernel is incorrect.
So finally I search somebody who could give me steps to deploy correctly my zimage on my phone...
(HOMTOM HT17 MT6737 chip)
Thanks for your reading.
Emmanuel,
Aix En Provence, France
Greeting,
Thank you for using XDA-Assist, you might get more help by others expert in here Homtom HT17-MT6737
XDA-Assist-Team

Categories

Resources