Sunteți pe pagina 1din 6

All work on porting begin with the creation of boot.img for our phone.

With the help


of tools attcha unpack the stock and donor boot.img. I hope everything figured out
that this should be done in different directories? After unpacking, we obtain the
following set of files and directories:
:)

rmdisk / is the directory that contains the init scripts


the boot.img
cksum.py
the kernel - the core.
kernel_no_header - kernel header.
mkbootimg
pack.sh
a ramdisk
ramdisk_no_header
ram_header
unpack.sh

From the unpacked stock boot.img copy files with replacement kernel and
kernel_no_header in donor unpacked boot.
The next step - a comparison and correction of init scripts in the directory / rmdisk:
-rw-r - r-- 1 loki loki 16902 April. 4 advanced_meta_init.rc 14:56
drwxrwx - 2 x loki loki April 4096. 4 the data 14:56
-rw-r - r-- 1 loki loki 198 in April. 4 default.prop 14:56
drwxr-xr-x 2 loki loki April 4096. 4 dev 14:56
-rw-r - r-- 1 loki loki 0 April. 4 factory_init.project.rc 14:56
-rw-r - r-- 1 loki loki 12787 April. 4 factory_init.rc 14:56
-rw-r - r-- 1 loki loki 594 in April. 4 fstab file 14:56

-rwxr-x --- 1 loki loki 162,812 in April. The init 4 14:56


-rwxr-x --- 1 loki loki 69 April. 4 init.aee.customer.rc 14:56
-rwxr-x --- 1 loki loki 25862 April. 4 init.charging.rc 14:56
-rwxr-x --- loki loki 1 April 2583. 4 init.goldfish.rc 14:56
-rwxr-x --- loki loki 1 April 2954. 4 init.modem.rc 14:56
-rwxr-x --- 1 loki loki 424 in April. 4 init.no_ssd.rc 14:56
-rwxr-x --- loki loki 1 April 2628. 4 init.project.rc 14:56
-rwxr-x --- 1 loki loki 969 in April. 4 init.protect.rc 14:56
-rwxr-x --- 1 loki loki 44276 April. 4 init.rc 14:56
-rwxr-x --- loki loki 1 April 1965. 4 init.trace.rc 14:56
-rwxr-x --- 1 loki loki 20264 April. 4 init.usb.rc 14:56
-rwxr-x --- 1 loki loki 583 in April. 4 init.xlog.rc 14:56
-rw-r - r-- 1 loki loki April 882. 4 meta_init.modem.rc 14:56
-rw-r - r-- 1 loki loki April 1550. 4 meta_init.project.rc 14:56
-rw-r - r-- 1 loki loki 10762 April. 4 meta_init.rc 14:56
drwxr-xr-x 2 loki loki April 4096. 4 the proc 14:56
lrwxrwxrwx 1 loki loki April 11. 4 of res 14:56 -> / system / of res
drwxr-x --- loki loki 2 April 4096. 4 sbin 14:56
drwxr-xr-x 2 loki loki April 4096. 4 the sys 14:56
drwxr-xr-x 2 loki loki April 4096. 4 system 14:56
-rw-r - r-- 1 loki loki 272 in April. 4 ueventd.goldfish.rc 14:56
-rw-r - r-- 1 loki loki April 5887. 4 14:56 ueventd.rc

From all this abundance of files we are interested init.rc. For comparison, I use a
utility Compare. The screenshot below is clear first place where differences are
possible (left stock init.rc right donor):
Posted image

These differences and should remain unchanged. We continue to compare the files
marked to section:
# Add by MTK

differences can be ignored. But within this section with the differences Stokmena
should not be. Although in most cases only a part describing different cameras:
Posted image

It must be brought to conformity with the drain (ie the right things should look like
the left). Next to the mark:
#
# Sensor service, (the begin)
#

Differences can also be ignored, but after this mark differences with sink should not
be.
As a rule not available to donor service memsicd3416x - in charge of the sensors in
our phone. Below is a screenshot of how it usually looks:
Posted image

After the tags:


#
# Sensor service, (end)
#

Changes can also be ignored. And save the modified file.

At the minimum necessary adaptation of the donor boot.img is finished - it is packed


utility pack.sh and the resulting new-boot.img copied to somewhere to the side with
the renaming of boot.img.

adapting system
The first where to start work on the / system - is to check them occupied size. Let
me remind you, we have the size allotted under this section 496mb. If the donor
system is greater than this value, you will either have to try to remove any
unnecessary patching BigSystem to increase the section. There are two options, the
first lazy - take already made by me before beyspaki and change the contents to
appropriate directories in the firmware on the donor taken from beyspaka. And then
in principle you can not read Well, about the second option, we'll talk further. The
average hospital listing / system looks like this:
:)

drwxrwxr-x loki loki 17 April 4096. 3 14:11.


Drwxrwxr x-loki loki 5 April 4096. 4 .. 12:20
drwxrwxr x-loki loki 2 April 4096. The app 4 12:19
drwxrwxr x-loki loki 3 April 4096. 3 bin directory 13:59
drwxrwxr x-loki loki 2 April 4096. 3 bpm 11:12
-rw-r - r-- 1 loki loki April 5867. 3 build.prop 14:11
drwxrwxr x-loki loki 3 April 4096. 3 the data 11:12
drwxrwxr x-loki loki 19 April 4096. 3 etc 11:23
drwxrwxr x-loki loki 2 April 4096. 3 fonts directory 11:12
drwxrwxr x-loki loki 2 April 4096. 3 framework is 11:12
drwxrwxr x-loki loki 8 April 24576. 3, the lib 11:12
drwxrwxr x-loki loki 5 April 4096. 4 media 12:16
drwxrwxr x-loki loki 2 April 4096. 3 mobile_toolkit 11:24
drwxrwxr x-loki loki 4 April 4096. 3 of res 11:12

drwxrwxr x-loki loki 3 April 4096. 3 tts 11:12


drwxrwxr x-loki loki 7 April 4096. 3 usr 11:12
drwxrwxr x-loki loki 5 April 4096. 3 the vendor 11:12
drwxrwxr x-loki loki 2 April 4096. 3 11:12 xbin

Please compare the contents of the printed catalog / bin to drain and the donor. The
task is added to the donor that is in stock but not available in the donor.
Usually this file:
memsicd3416x
wlan_loader

These two files were present must necessarily, otherwise there will be wifi and the
correct values from the sensors.
Then go to the directory / system / data / misc and replace file ProjectConfig.mk on
the same of the flow.
For that meets this file is not really clear , but the fact that it affects the operation of
the firmware is a proven fact.
In the directory / etc respectively replaced completely:
/ the firmware
/ MDDB

The next step - the catalog / the lib , it completely replaced the directory / modules
and the following files:
libaudio.primary.default.so
libcameracustom.so
libsensorservice.so

In the directory / lib / hw replace:

camera.default.so
sensors.default.so

File build.prop initially you could and probably do not need to touch it. Just be sure
that the firmware is started up on the phone, you can start editing it. Usually, I just
change the name of the phone model on Thl w100 region and language.
And actually this minimum necessary changes to / system completed.

Now you can collect from the resulting update.zip and sew through CWM.
If you are using update.zip harvesting from the donor, it is necessary to make sure
that / META-INF / com / google / android / updater-script are correct partitions for
system and data we this:
system - / dev / block / mmcblk0p5
the data - / dev / block / mmcblk0p7

That is now briefly to manual. To begin with it is enough, we could certainly paint in
more detail, but are not Chukchi writer .. And in general, only solving the problem
acquires knowledge

S-ar putea să vă placă și