[Android] waqasjeral:
hi

I purchased a Samsung Galaxy A8 A8000 from China. I did not like its ROM since it lacked Google Apps and other stuff. So i decided to port system apps (apps+priv-app) from an indian rom. I am totall new to ROM stuff and to linux as well but i decided to go with virtual box and learn few things along the way.

For this,

first i extracted indian rom, it contained following

boot.img, cache.img, hidden.img, modem.bin, recovery.img, sboot.bin and system.img

then i extracted chinese rom, it contained different files as below

aboot.mbn, boot.img, cache.img.ext4, hyp.mbn, modem.bin, NON-HLOS.bin, recovery.img, rpm.mbn, sbl1.mbn, sec.dat, system.img.ext4 and tz.mbn

Since i donot want to mess with partitions and modem and other stuff so i decided to port only apps from indian rom and built an odin flashable tar file

For this i navigated various forum, i even dont exactly remember all but i am thankful to all who wrote useful stuff that helped me decide what to do, well most important of these were

http://xdaforums.com/showthread.php?t=1974014

http://xdaforums.com/showthread.php?t=1941239

http://rwilco12.com/forum/showthread.php?tid=92

first of all i converted indian rom system.img to system.raw using following command in linux virtualbox ubuntu 15.04

simg2img indsystem.img indsystem.raw

then i mounted this raw image using this command

mkdir indsystem

mount -o loop indsystem.raw indsystem/

then i converted chinese rom system.img to system.raw using same command as above

simg2img chcsystem.img chcsystem.raw

then i mounted this chinese raw image using this command

mkdir chcsystem

mount -o loop chcsystem.raw chcsystem/

then i created a system_new.img.ext4 file of 3.1GB size with this command

dd if=/dev/zero of=system_new.img.ext4 bs=4k count=775000

then i formated new image with ext4

mkfs.ext4 system_new.img.ext4

then probably i override the file system check and then mounted new ext4 image

tune2fs -c0 -i0 system_new.img.ext4

mkdir system_new

mount -o loop system_new.img.ext4 system_new

here i had a problem, i could not copy files from both indian and raw mounted images to my new ext4 image since i did not have permission to copy to the destination folder. then i made use of superuser access

gksu nautilus /path/to/image/folder

then i had full access and copied chinese rom to my new ext4 image.

cp -v -r -p chcsystem/* system_new/

then i deleted app, priv-app, font, framework, media, etc/permissions/allfiles-starting-with-android.-and-com.-and-allshare_library.xml from ext4 image.

then i manually copied these folders and permission files from indian system raw image file to my new ext4 image file

next i copy /system/lib/libandroid_runtime.so from chinese rom to the system/lib/ directory of indian rom and then deleted lib folder from chinese rom and replaced it with indian rom

then i sync files with "sync" command

then unmounted all partitions.

I then replaced system.img.ext4 file in my original rom with one that i have just made.

Now i need to compile these files back into flashable tar files with md5sum check with

tar -H ustar -c image_1 image_2 > your_odin_package.tar

md5sum -t your_odin_package.tar >> your_odin_package.tar

mv your_odin_package.tar your_odin_package.tar.md5

1. but before i do so I need some advance developer to please help me out and give some confidence as to the approach that i have used. is that correct.

2. Secondly, if someone can tell me tar ball flashing order for my rom since i heard it is important while compiling odin flashable tar file.

aboot.mbn, boot.img, cache.img.ext4, hyp.mbn, modem.bin, NON-HLOS.bin, recovery.img, rpm.mbn, sbl1.mbn, sec.dat, system.img.ext4 and tz.mbn

3. Also Is it possible that i convert system.img.ext4 into flashable odin tar file with above commands and flash only system image with Odin without messing with anyother settings.

Thank you