title: How do I prepare a file to flash my phone with
body: <p>I want to create an image for the Arm chip and deploy it on my Samsung Note 3. I have a compiled copy of </p>
  
  <p>the Samsung source. I added another module to this copy for added functionality. I then downloaded a copy </p>
  
  <p>of the stock firmware, which I have used a number of times to flash my phone. I took the boot.img file of </p>
  
  <p>the stock firmware split it open with a tool online, and replaced the zImage with the zImage that I got </p>
  
  <p>from compiling my source. After several attempts, I seem to be able to create a complete tar.md5 file of </p>
  
  <p>everything in the directory of modified stock source. When I flash the phone with this file using Odin, </p>
  
  <p>the file goes in fine, but the phone is stuck in download mode. I am trying to figure out the main cause </p>
  
  <p>of phone going into download mode, and is the root cause one of packing the files incorrectly or did I not </p>
  
  <p>include a file that is required? Here is what I did to create the tar file with md5 authentication: </p>
  
  <p>I created the tar file:
  tar -H ustar -c aboot.mbn sbl1.mbn rpm.mbn tz.mbn sdi.mbn NON-HLOS.bin boot.img recovery.img </p>
  
  <p>system.img.ext4 cache.img.ext4 modem.bin > tarfile.tar</p>
  
  <p>cp tarfile.tar tarfile.tar.md5
  md5sum tarfile.tar >> tarfile.tar.md5</p>
  
  <p>I then tried to do a sanity check by comparing the file with a tar archive in an image I have used to </p>
  
  <p>flash my phone with using the file command, and here is what I get ( note: I put my results in the </p>
  
  <p>/expermental directory and the unpacked validated tar file in /originalstck/originaltarfile directory ) ( </p>
  
  <p>Note also that the file called tarfile below is the result of packing my files vs. </p>
  
  <p>N900PVPUCNC5_N900PSPTCNC5_N900PVPUCNC5_HOME.tar.md5 is what was in the validated stock rom ) :</p>
  
  <pre><code>@ubuntu:~/expermental_stock$ file *
  aboot.mbn:                                           Hitachi SH big-endian COFF object, not     stripped
  boot.img:                                            data
  cache.img.ext4:                                      data
  info:                                                ASCII text
  initramfs.cpio.gz:                                   gzip compressed data, from Unix
  modem.bin:                                           x86 boot sector
  N900PVPUCNC5_N900PSPTCNC5_N900PVPUCNC5_HOME.tar.md5: POSIX tar archive
  N900PVPUCNC5_N900PSPTCNC5_SPR.zip:                   Zip archive data, at least v2.0 to extract
  NON-HLOS.bin:                                        x86 boot sector
  recovery.img:                                        data
  rpm.mbn:                                             ELF 32-bit LSB  executable, ARM, EABI5 version 1 
  (SYSV), statically linked, stripped
  sbl1.mbn:                                            data
  sdi.mbn:                                             ELF 32-bit LSB  executable, ARM, EABI5 version 1 
  (SYSV), statically linked, stripped
  SS_DL.dll:                                           PE32 executable (DLL) (GUI) Intel     80386, for MS 
  Windows
  system.img.ext4:                                     data
  tarfile.tar:                                         POSIX tar archive (GNU)
  tz.mbn:                                              ELF 32-bit LSB  executable, ARM, EABI5     version 1 
  
  (SYSV), statically linked, stripped
  zImage:                                              Linux kernel ARM boot executable  zImage (little-
  
  endian)
  
  file ~/originalstock/originaltarfile/*
  /aboot.mbn:                                           Hitachi SH big-endian COFF object,    not stripped
  /boot.img:                                            data
  /cache.img.ext4:                                      data
  /modem.bin:                                           x86 boot sector
  /N900PVPUCNC5_N900PSPTCNC5_N900PVPUCNC5_HOME.tar.md5: POSIX tar archive
  /NON-HLOS.bin:                                        x86 boot sector
  /recovery.img:                                        data
  /rpm.mbn:                                             ELF 32-bit LSB  executable, ARM,  EABI5 version 1 
  
  (SYSV), statically linked, stripped
  /sbl1.mbn:                                            data
  /sdi.mbn:                                             ELF 32-bit LSB  executable, ARM,   EABI5 version 1 
  
  (SYSV), statically linked, stripped
  /system.img.ext4:                                     data
  /tz.mbn:                                              ELF 32-bit LSB  executable, ARM,  EABI5 version 1 
  (SYSV), statically linked, stripped
  </code></pre>
  
  <p>( Note: Here tarfile.tar is the file I made, and I am comparing it with the original tar file that came with the stock rom, which is called N900PVPUCNC5_N900PSPTCNC5_N900PVPUCNC5_HOME.tar.md5.) There are two things that concern me with the above output as I am comparing tarfile.tar in /experimentalstock directory with N900PVPUCNC5_N900PSPTCNC5_N900PVPUCNC5_HOME.tar.md5 file in the originalstock/originaltarfile dirctory. 1- tarfile.tar is smaller. I added more modules to the source. But that may be explained by the source I started from. I did compare the boot.img files, and the one I created by adding my zImage to it is larger than the one that came with stock rom. I started from the Samsung source code which may not contain the telecom provider's files. 2- My other concern is the output associated with the file command; for tar.file I get: POSIX tar archive (GNU) and for N900PVPUCNC5_N900PSPTCNC5_N900PVPUCNC5_HOME.tar.md5 I get POSIX tar archive. Is there a difference between the GNU version vs. whatever is the default format? </p>
  
  <p>My other question is how can see what is going on during the boot when I push my image to the phone? Is there some way I can save the logs on a phone that is unrooted? </p>
  
  <p>According to one of the online sources I used to get this far, I also need to or may include kernel modules. As far as I remember these files have a km extension? I did a search in my Kernel's directory, and do not see any files with this extension: </p>
  
  <pre><code>user@ubuntu:~$ locate -r '^/home/user/androidkernel3/.*.km$'
  /home/user/androidkernel3/arch/arm/mvp/commkm
  /home/user/androidkernel3/arch/arm/mvp/mvpkm
  /home/user/androidkernel3/arch/arm/mvp/oektestkm
  /home/user/androidkernel3/arch/arm/mvp/pvtcpkm
  user@ubuntu:~$ 
  </code></pre>
  
  <p>Sean </p>