Android : How do I prepare a file to flash my phone with

on Sunday, November 2, 2014


I have a successfully compiled Samsung Source, and added the module I wanted and compiled again without any problems. I got the zImage. I then followed the procedures below to replace the zImage of a stock firmware with mine. But when I transfer the zip file over to my phone, I can not flash it with twrp. Odin does not recognize the file either so the issue seems to be how I am packing the files. Here is what I have done:



:~/expermental_stock$ umkbootimg boot.img
unmkbootimg version 1.2 - Mikael Q Kuisma <kuisma@ping.se>
Kernel size 8262680
Kernel address 0x8000
Ramdisk size 1064985
Ramdisk address 0x2000000
Secondary size 0
Secondary address 0xf00000
Kernel tags address 0x1e00000
Flash page size 2048
Board name is ""
Command line "console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37
ehci-hcd.park=3"

*** WARNING ****
This image is built using NON-standard mkbootimg!
OFF_KERNEL_ADDR is 0xFE208100
OFF_RAMDISK_ADDR is 0x00200100
OFF_SECOND_ADDR is 0xFF100100
Please modify mkbootimg.c using the above values to build your image.
****************

Extracting kernel to file zImage ...
Extracting root filesystem to file initramfs.cpio.gz ...
All done.
---------------
To recompile this image, use:
mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x1dfff00 --cmdline 'console=null androidboot.hardware=qcom user_debug=31 msm_rtb
.filter=0x37 ehci-hcd.park=3' -o new_boot.img
---------------


I replaced the zImage with the new zImage I built myself, and I compiled using the above command. I then used the following command to pack all the components:



tar -H ustar -c aboot.mbn sbl1.mbn rpm.mbn tz.mbn sdi.mbn NON-HLOS.bin boot.img recovery.img system.img.ext4 cache.img.ext4 modem.bin > N900PVPUCNC5_N900PSPTCNC5_N900PVPUCNC5_HOME.tar


And I issued this one:



md5sum -t N900PVPUCNC5_N900PSPTCNC5_N900PVPUCNC5_HOME.tar >> N900PVPUCNC5_N900PSPTCNC5_N900PVPUCNC5_HOME.tar


Then I zipped the files this way:



zip N900PVPUCNC5_N900PSPTCNC5_SPR N900PVPUCNC5_N900PSPTCNC5_N900PVPUCNC5_HOME.tar.md5 SS_DL.dll

0 comments:

Post a Comment