[Q] How do I add my own img file to a separate partition ? - Galaxy Note 3 Q&A, Help & Troubleshooting

I am a beginner, and I have compiled a game built with C. The instructions I have say that I have to flash the final .img file to a separate partition on my SM-N900P. Now I have successfully downloaded the stockfirmware, unpacked it with mkbootimg, built my own dtb.img and flashed the phone. (Side note: I got an error about Samsung Keyboard, which if you know how I can address I would be grateful). I do not know how / where to put the .img file I compiled though. Do I pack it when I tar my files?

Related

status on rooting cliq

I found this on http://cliq-development.com/forums/viewtopic.php?f=5&t=13
hopefully this can help anyone who is trying to develop a way for root on the cliq.
To get where we are at in development you must learn about a few things
.SHX = A re-flashing file similar to a .nbh on the HTC brand. It is a full re-flash of everything on the phone, full stock. When extracted it creates three files the main one is the CG2
CG2 = A file extracted from the shx that hold the main partitions that will be flashed to the phone.
-----------------------------------------------------------------------------------------------------------------------
How to extract a shx
(http://modmymoto.com/forums/showthread.php?t=525344)
A developer by the name of Meiner Einer created a program named SbfRecalc. With this program we can extract three files and as i stated above the most important one is the CG2
How to extract a CG2
(http://modmymoto.com/forums/showthread.php?t=525477)
A developer by the name of Skrilax_CZ created a program named CG2 Parser. With this program we can extract all of the files within the CG2.
-----------------------------------------------------------------------------------------------------------------------
After you extract all of the files from the CG2 you will find that some of the names were similer to the partitions of the cliq. With a little file manipulation i recreated a boot.img and a recovery.img from some of the files. The guys over at modmymoto dumped a full system partition.
(http://android-dls.com/wiki/index.php?t ... oot_Images)
To recreate both the boot.img and the recovery.img just do these simple steps
1. Create a directory and put either bootsec.mbn or recoverysec.mbn from the CG2 dump inside it
2. Download the split_bootimg.pl from the link above and run it with the file in the directory to get both a kernel and a ramdisk file.
3. Using the mkbootimg from the android source code you can recombine the kernel and the ramdisk files to create your boot.img/recovery.img strait from the re-flash file
------------------------------------------------------------------------------------------------------------------------
With the system dump from modmymoto and my boot.img(+a little root) I created an update.zip file with root ready to be flashed when the keys are ready.
This is where we are at any help would be greatly appreciated.
Wow, nice work!
This could really so with a sticky...
Thanks for the update! The cliq goes hard. Once rooted its ova, best android phone on tmo!
Nice! It would be really great if you could repost this at android-devs.org over in the cliq development section of the forum
Since XDA is only for HTC phones and most people here most likely don't have the cliq and there really isn't a correct forum to have this posted in..
I'd reccomend using android-devs.org forums

[HELP] can somebody extract this boot.img please

hi,
i have a big problem.
i have extracted with perl script the boot.img from updata.app
this works fine... but when i want to extract the boot.img, then i have many errors and the .gz files are not readable.
i have tried it under windows and ubuntu, but still the same :-(
can somebody extract the file ?
here is the .img file
http://www.megaupload.com/?d=XX69Z7BM
many thanks
That img file is corrupt, or does not have a ramdisk image within it (only a kernel). Or it is using some non-standard means to store the ramdisk.
What is it from and how did you extract it?
thanks for your replay
the file is from a v845 (huawei 8120).
Firmware: V845 V100R001MYSC02B 236(Malaysia)
from here: huawei
i used the script split_updata.pl, split_bootimg.pl and unyaffs.exe
the boot.img doesn't use yaffs2, it is a raw kernel image combined with a cpio archive of the ramdisk image (and a short header to tell where the files are delimited). Your file has a corrupt header. I was able to extract it for you. Do you want me to attach it for you? I assume you extracted the kernel OK (it worked for me).
Gene Poole said:
the boot.img doesn't use yaffs2, it is a raw kernel image combined with a cpio archive of the ramdisk image (and a short header to tell where the files are delimited). Your file has a corrupt header. I was able to extract it for you. Do you want me to attach it for you? I assume you extracted the kernel OK (it worked for me).
Click to expand...
Click to collapse
yes, please attach it
can you tell me, with which tools you managed to extract the kernel ?
thanks
wildgunman said:
yes, please attach it
can you tell me, with which tools you managed to extract the kernel ?
thanks
Click to expand...
Click to collapse
I normally use the tools found in this thread:
http://forum.xda-developers.com/showthread.php?t=551711
but like I said, your image was corrupt or something. I just hex grepped it for a gzip signature indicating the start of the gzipped cpio ramdisk portion.

[Linux]Ubuntu13.04_RaringRingtail for N7 posted

FYI, at the following:
https://wiki.ubuntu.com/Nexus7/Installation (scroll down towards bottom)
http://cdimage.ubuntu.com/daily-preinstalled/current/
The gunzipped img archive contains a .RAW file. I would like to install this using the multiboot setup instead of the rootfs.IMG file.
Can I used the posted method by Tasssadar here:
http://forum.xda-developers.com/showthread.php?t=2011403
and simply substitute the .IMG file for the new .RAW ubuntu release, or does the file need to be converted to an .IMG file first?
thx

How to create boot.img

I have some original C code, which I have compiled successfully, and like to put on my phone, SM-N900P. I downloaded a copy of stock firmware and used unmkbootimg to unpack the boot.img. What do I do from here on? I have searched online and this site. I believe I have to put my files in the ramdisk directory. What I do not know is what files go in there? Can I put .img files in there? Is there a specific order in which directory to use within the ramdisk? I read someone's post instructing me to put the .ko files in ramdisk/lib/modules directory. But the ramdisk directory I have does not have a /lib directory. Should I create one? I only ask because each phone seems to have a different setup. I basically have a zImage, dt.img, and a couple of other img files.
Even if you can not help, I appreciate if you point me to relevant useful information.
Thanks
sansari123 said:
I have some original C code, which I have compiled successfully, and like to put on my phone, SM-N900P. I downloaded a copy of stock firmware and used unmkbootimg to unpack the boot.img. What do I do from here on? I have searched online and this site. I believe I have to put my files in the ramdisk directory. What I do not know is what files go in there? Can I put .img files in there? Is there a specific order in which directory to use within the ramdisk? I read someone's post instructing me to put the .ko files in ramdisk/lib/modules directory. But the ramdisk directory I have does not have a /lib directory. Should I create one? I only ask because each phone seems to have a different setup. I basically have a zImage, dt.img, and a couple of other img files.
Even if you can not help, I appreciate if you point me to relevant useful information.
Thanks
Click to expand...
Click to collapse
boot.img contain: ramdisk, zImage (kernel compressed with modules), dtb (device tree binary) and some time have name dt.img.
When you compile kernel from source, you will get zImage and dt.img (if you use dtbTool to merge all device tree rev). Use xiaolu's unmkbootimg to extract stock kernel to get ramdisk and modify it, replace zImage and dt.img then repack it to become boot.img and ready to flash it.
You should create thread in Q&A box
hiepgia said:
boot.img contain: ramdisk, zImage (kernel compressed with modules), dtb (device tree binary) and some time have name dt.img.
When you compile kernel from source, you will get zImage and dt.img (if you use dtbTool to merge all device tree rev). Use xiaolu's unmkbootimg to extract stock kernel to get ramdisk and modify it, replace zImage and dt.img then repack it to become boot.img and ready to flash it.
You should create thread in Q&A box
Click to expand...
Click to collapse
Thanks. I'll move to Q&A

convert tar to zip?

I've been scouring the interweb looking for a way to take a stock tar file and convert it to a zip file that will flash with twrp. I know it can be done, but thus far I'm not happy with the processes I've found... how do you guys do it?
The stock TAR files contain partitions in IMG format - an all in one file system, and in this case using EXT4 formatting.
In order to create a ZIP, you need to access the files on the partition, which means finding a way to mount those IMG partitions to copy their contents, or find a piece of software to extract from them w/o mounting. Since they are EXT4, you can probably assume a Windows solution isn't available (EXT4 is Linux). Some utilities may exist to handle EXT4 on Windows, but finding one that knows EXT4 and can extract/mount an IMG file is pretty specific.
EDIT : found a utility for you - http://forum.xda-developers.com/showthread.php?t=2285831
If you can somehow get the files out of the archive, you'll need to find a tutorial on the structure of a flashable ZIP. Generally, its just folders and files but there is also a META-INF folder, scripts to install and set permissions, etc. There are likely threads here on XDA that can detail these steps.
Spitzaf, thanks so much! I was hoping for just such a tool

Categories

Resources