[Q] A few questions related to porting... - Android Q&A, Help & Troubleshooting

ok so im trying to port for the first time to a i5800.
Now i have Ubuntu and the disxda's kitchen in it.
I've got the boot.img , system.img, data.img, zImage and factoryfs.rfs of my phone with me.
Now my questions are:
1. would a Froyo init.rc work for the ICS?
2. When i try to mount the factoryfs.rfs of my phone, the aplications i tried to use always gave an error stating its not a valid CD image or somethingsimimlar(ive used UltraISO and MagicISO)
3. When i try to extract boot.img using disxda's kitchen, it says Android header not found in boot.img or anywhere in the boot.img and the kernel pagesize is 0.
4. i dont want an Update.zip instead i want it like a flashable rom(are they the same?)
Any help would greatly be appreciated.

Related

zImage - initramfs.cpio.gz - openaos-gingerbread-XXX.img.gz

Hi to all,
I have a question about this three file :
zImage - initramfs.cpio.gz - openaos-gingerbread-XXX.img.gz
I Know that initramfs.cpio.gz it' useful only to set up the environment (set up filesystem and various exucutable) to boot correctly the zImage (Kernel Android).
So when I flash the device and then I choose the boot from Developer Edition , the device use the initramfs.cpio.gz and the zImage used in flash procedure.
But why i need to copy openaos-gingerbread-XXX.img.gz in the root of the directory?
what is this image file? what's' your role?
thanks so muck
It contains the whole OS,so gingerbread is in there.
Or what did you think where GB is coming from!?
It's right... sorry for my stupid question. I don't know why... but I thought that the OS was the same
thanks a lot...

[Q] [Module] Build and load module on GS3

Hello,
I tried to do a simple task which raise several problem and it start to drive me crazy, so here I am, asking for help. The subject may have been already mentioned, but can't find an issue with the galaxy s3.
I work with ubuntu 12.04 and Odin on win7. My GS3 has XXELL4 baseband, and 3.0.31-742798 kernel version.
I need to load and run a custom module (let's say a "hello world" one for begin) on the galaxy S3.
I compiled it through a Makefile with the toolchain from the ndk package (
Code:
path_to_ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-
and the source code from the samsung web site (GT-I9300_JB_Opensource_Update8.zip).
Obviously, when i tried to insmod my module, I've got some compatibility error like
Code:
Exec format error
.
The fact is that the kernel from website is not the same as the phone one.
So I tried to put the kernel from the website on the phone
I compiled it with the same toolchain and I received a zImage file in result. But what to do with this file ? I extracted a boot.img from the phone with Odin and split it (with perl script stuff) to use the extracted files with my compiled zImage for reconstruct a new boot.img. But since fastboot is not available on GS3 (or I miss something) I can't simply
Code:
$ fastboot flash boot boot.img
, and need to use Odin again. So I replace the boot.img from odin's backup folder on my PC with my boot.img. But the nandroid.md5 file raise an error. Am I doing it wrong or too complicated ? If I can correct the md5 error, is that my module will work ?
I also tried to compil my module directly with the kernel from the phone but didn't manage to extract the kernel files to do it. Stuck with a boot.img. Same with the stock kernel from http://forum.xda-developers.com/showthread.php?t=1646610
I made a lot of research but don't find any concrete solutions to my simple task. Maybe I miss something or looking too deep.
Is there a more simple way to run a custom module on the GS3 ?
sorry for my english
Hello and welcome to xda!
You do not have to use odin to flash your kernel, you can do it via custom recovery too.
Just get an simple cwm package of another kernel for s3 and replace the boot.img in the zip.
I attached a simple empty cwm package, just drag your boot.img to the root of the zip with winrar or something.
hsrars-d said:
Hello and welcome to xda!
You do not have to use odin to flash your kernel, you can do it via custom recovery too.
Just get an simple cwm package of another kernel for s3 and replace the boot.img in the zip.
I attached a simple empty cwm package, just drag your boot.img to the root of the zip with winrar or something.
Click to expand...
Click to collapse
Thanks
I've got also a md5 error when i tried to restore with cwm, since I have no md5 file in my folder. Do I need to generate one ? how ?
EDIT: so a generate a md5 file with md5sum, but still have the Exec format error when i try to insmod my module.
ok, im not good with kernel stuff/modules so i cant help you any further...
try to find someone that has experience with kernel modules
edit: found something with google, not exactly for s3 but the error is pretty common:
http://www.linuxquestions.org/questions/linux-kernel-70/insmod-error-version-magic-4175424366/
http://forum.xda-developers.com/showthread.php?t=444338&page=1
http://stackoverflow.com/questions/...for-android-unknown-relocation-27-when-insmod
Why are you posting in this section?
Glebun said:
Why are you posting in this section?
Click to expand...
Click to collapse
well ... I don't yet have access to other section. But If someone could move the thread in a more appropriate one I'll thanks him.
Yes, you do. Questions go in the Q&A section, obviously

[Q] Unpack boot.img. How to do?

Welcome.
For a long time I get tired of the boot.img file. I do not know what I'm doing wrong but I can not decompile it to the form that let would to edit. He wants to make some changes in files and default.prop init.rc but I can not because the only file which me to unpacks zImage file is empty, or if I use another tool I received an error "android magic not found" (magical first 7 letters of also I added Hexedit but still the same error).
Here you can download the file boot.img of the fight:
boot.img - 7.44 MB
I have tried programs:
- Android-Kitchen-master
- Android Image Kitchen
- bootimg_tools
- unmkbootimg
- kernel-tools-master
- linux_kernelkitchen-0.002
But unfortunately without success
If someone manages to successfully dismantle this file I would really ask for instructions on how to go about it.
Thank you in advance for your help and sorry for my poor english.

boot.img changes after unpack-repack without edit

I have met some problem with boot.img and need some help if there's somebody know it.
I used unmkbootimg and mkbootimg, I unpacked a boot.img then got zimage and initramfs.cpio.gz, I repacked it without any edit but the new boot.img becames smaller, it changed from 13M to 7.9M, and the phone couldn't boot from new boot.img,
and there is no question if I use a boot.img extracted from an android3.x-version rom, but if the android version changes to 4.x, the unpack-repack process would lose much size...I tested on mi2s' rom......I don't know if there are some files that will be lost in unpack process, or say the process just ignore files other than zimage and initramfs...
does anybody knows why?
binghemoye said:
I have met some problem with boot.img and need some help if there's somebody know it.
I used unmkbootimg and mkbootimg, I unpacked a boot.img then got zimage and initramfs.cpio.gz, I repacked it without any edit but the new boot.img becames smaller, it changed from 13M to 7.9M, and the phone couldn't boot from new boot.img, does anybody knows why?
Click to expand...
Click to collapse
It could be because of incorrect settings for mkbootimg or there more files,than zImage and initramfs, needed for proper work. Hard to say without more information.
Sorry for my bad English.
B.B.N. said:
It could be because of incorrect settings for mkbootimg or there more files,than zImage and initramfs, needed for proper work. Hard to say without more information.
Sorry for my bad English.
Click to expand...
Click to collapse
There is no question if I use a boot.img extracted from an android3.x version rom, but if the android version changes to 4.x, the unpack-repack would lose much size...I tested on mi2s' rom......I don't know if there are some files that will be lost in unpack process, or say the process just ignore files other than zimage and initramfs...

Custom ROM for new device

Hi, I have new Prestigio tablet PMT5777_3G and I want to modify it's default ROM. I followed this tutorial: http://forum.xda-developers.com/showthread.php?t=1801690. I successfully extracted system folder, but I have no idea how to create updater-script for this specific ROM. If I understand correctly I need to get updater-script from original ROM.
I've got something that resembles original ROM, but it's folder structure is completely different from what I would expect.
I would expect:
META-INF
system
boot.img
I've got:
APDB_MT6582_S01_MAIN2.1_W10.24
boot-sign.img
BPLGUInfoCustomAppSrcP_MT6582_S00_MOLY_WR8_W1315_MD_WG_MP_V12_P4_1_wg_n
cache-sign.img
Checksum.ini
EBR1-sign
lk-sign.bin
logo-sign.bin
MBR-sign
MT6582_Android_scatter.txt
preloader_htt82_tb_jb5.bin
recovery-sign.img
secro-sign.img
system-sign.img
sro-lock-sign.img
sro-unlock-sign.img
userdata-sign.img
I'm an android developer, but have no experience with custom ROM's and now am in a situation, where I want to get that custom ROM up and running, but am unable, because I can't figure out how to create updater-script or extract it from files that I currently have. It would be great if someone could point me to the right direction of what to do next.
Thanks
P. S. It seems it's against the rules to ask questions here, but I can't seem to find where else to ask this on xda
Dantenas said:
Hi, I have new Prestigio tablet PMT5777_3G and I want to modify it's default ROM. I followed this tutorial: http://forum.xda-developers.com/showthread.php?t=1801690. I successfully extracted system folder, but I have no idea how to create updater-script for this specific ROM. If I understand correctly I need to get updater-script from original ROM.
I've got something that resembles original ROM, but it's folder structure is completely different from what I would expect.
I would expect:
META-INF
system
boot.img
I've got:
APDB_MT6582_S01_MAIN2.1_W10.24
boot-sign.img
BPLGUInfoCustomAppSrcP_MT6582_S00_MOLY_WR8_W1315_MD_WG_MP_V12_P4_1_wg_n
cache-sign.img
Checksum.ini
EBR1-sign
lk-sign.bin
logo-sign.bin
MBR-sign
MT6582_Android_scatter.txt
preloader_htt82_tb_jb5.bin
recovery-sign.img
secro-sign.img
system-sign.img
sro-lock-sign.img
sro-unlock-sign.img
userdata-sign.img
I'm an android developer, but have no experience with custom ROM's and now am in a situation, where I want to get that custom ROM up and running, but am unable, because I can't figure out how to create updater-script or extract it from files that I currently have. It would be great if someone could point me to the right direction of what to do next.
Thanks
P. S. It seems it's against the rules to ask questions here, but I can't seem to find where else to ask this on xda
Click to expand...
Click to collapse
Since you are a beginner to ROM development, I would recommend the use of dsixda's Android kitchen, which you probably have downloaded already. If not use this link
http://forum.xda-developers.com/showthread.php?t=633246
Follow these steps to obtain the file structure and Meta-Inf folder for your custom rom.
1. Open the folder where you have placed the kitchen.
2. You will find a folder called original_update.
3. Open that folder and copy your boot.img and system.img files into it. ( In your case it is boot-sign.img and system-sign.img. Rename those files into boot.img and system.img and place them in the folder )
4. Now open the kitchen. ( Refer the above link to know how to do it )
5. You will find " 1. Set up working folder from ROM " option under Main Menu.
6. Type 1 and you will be directed to another menu. Click Enter.
7. Select your boot.img and system.img from the menu.
8. Now follow the instructions that appear on the screen.
9. When you successfully complete the steps, you will have the required Working folder, with boot.img, system folder and Meta-Inf folder, which will contain the updater-script (It will be automatically generated)
All the best. :good:
Hit Thanks if this helped you... PM me if you need further help or search the forum for detailed instructions.
Thanks, this helped me, but I still can't create ROM.
I encountered a problem with kitchen:
Code:
Available ROMs:
(1) system.img and boot.img
Enter selection number (default=1, cancel=0, r=refresh):
Found original_update/system.img
Found original_update/boot.img
The new working folder will be named WORKING_061614_070841
Change the name (y/n)? (default: n):
Creating working folder WORKING_061614_070841 ...
Copying boot.img ...
Copying system.img ...
Adding an update-script ...
NON-YAFFS/NON-TAR FILE FORMAT DETECTED IN ROM
Mounting system.img to loopback device and then extracting files ...
Error: Unable to mount system.img
Error: No /system/framework folder found!
Press Enter to continue
This creates my missing update-script and boot.img, but system folder is empty.
Would it be a good idea to extract all system files from device and attempt to create ROM with them, and this update-script, or is there something I could do with system.img to make it extract?
Try this
Don't worry. There's always an alternative. Try this simple method.
1. Boot into CWM (Clockwork Mod) Recovery. (I'm pretty sure you know how to do it, if not, you can feel free to search the forum)
2. Choose Backup and Restore.
3. Make a backup in your external sdcard.
4. Now boot normally, open your external sdcard. You will find a folder called clockworkmod. Copy that folder to your PC.
5. Inside that folder, you will find the backup.
6. Now, copy boot.img and system.ext4.tar.a to your original_update folder of the kitchen.
7. Warning! Do not copy system.ext4.tar, only copy system.ext4.tar.a
8. Once you have copied these two files, rename system.ext4.tar.a into system.ext4.tar
9. Now, open android kitchen and follow the exact same steps as you did before.
10. When you choose the available rom, you will find the screen as below.
Code:
Available Roms:
(1) system.ext4.tar and boot.img
11. Choose it and follow the instructions. You will have your required working folder.
Try this and let me know if you still face any issues. :good:
I was unable to load CWM recovery, because it is not supported by my device. I tried TWRP too, which also doesn't support my device. Is it possible to do without CWM?
Dantenas said:
I was unable to load CWM recovery, because it is not supported by my device. I tried TWRP too, which also doesn't support my device. Is it possible to do without CWM?
Click to expand...
Click to collapse
I'm sorry my friend, even if you create your own ROM, you require either one of them to flash the ROM to your device. Seeing you so keen on developing the rom, try to use any yaffs tool to create your system.img from extracted system folder. You may refer this thread.
http://forum.xda-developers.com/showthread.php?t=1645412

Categories

Resources