73 pagesV  « < 71 72 73 »  
 
REPLY
> MIUI porting | To your device
wmaster
Message#1
17.06.12, 12:21
MIUI dev
********
[offline]

Group: Friendssavagemessiahzine.com
Messages 1341
Check in: 23.03.11
Xiaomi Redmi 5 Plus 3/32

Reputation:-  512  +

Porting MIUIv5 (Android 4.1.2./4.2.2)


Attached Image


The topic cap has been rewritten; we start the discussion of new information withthis post


Owners of devices on the MTK pass by - you have other ways of porting

Owners of devices with ArmV6 - also by, on this architecture, MIUIv5 will not work

� ����� � ���, ��� ��� ������ ��������� ����� �������� � ������������ miui, � �������� ��� �� ����� �� �������� ������������ miui v5. download





BASIC INSTRUCTION aka porting "pens"
And so, we will need:
* The presence of CyanogenMod 10 / 10.1 on your device, because We will use cyanogenmod as a base.
*Apktool, jBart... in general, see for yourself what you prefer to work with.
* A program to compare files, for exampleMerge, Beyond Compareor analogues.
* Installed adb drivers and ability to use LogCat. (Here is a list of how to use it all. ;))
* A little patience and perseverance.



Training :
The first, and probably the most difficult, is the choice of donor’s firmware (from whom we will port)
I will explain a little what criteria you should pay attention to:
Because Official MIUIv5 are based on stock / aosp firmware - they do not suit us. We are looking for unofficial firmware based on cyanogenmod 10 / 10.1 too. Make sure that the donor firmware is based on CM is very simple - download the firmware, look at build.prop or disassemble boot.img and look at ramdisk. A huge number of such firmware can be found on the site.en.miui.com(The easiest way is to go to system / etc / and look for the file "CHANGELOG-CM.txt." If there is a file, then the firmware is uniquely based on cm (but there are cases that developers delete this file ...)
We do not pay special attention to processors, we pay more attention to the screen resolution. But again, the more similar the device, the easier it will be for you :).


Getting started (a lot of text :)):
* And so, we downloaded miui (donor), prepared CM10 / 10.1 (base) or whatever you have :), unpack the donor firmware (miui) in some folder, next to we put the archive with your base (the basic firmware does not unpack need, everything will be added directly to the archive).

* First of all we take the files
framework-res.apk
framework.jar
services.jar
telephony-common.jar

(lie in the system / framework /) from your base firmware and decomeply them, we place the decompiled files in a secluded place.


*1.We decrypt framework-res.apk from the donor’s firmware, go to framework-res.apk / res / values ​​/ and compare the arrays.xml file with the file from the decompiled framework of the base firmware.
We are interested in the values

<string-array name = "config_tether_usb_regexs">
<string-array name = "config_tether_wifi_regexs">
and if there is<string-array name = "config_tether_bluetooth_regexs">


Attached Image

We replace the values ​​with the values ​​from the base framework (this is necessary for the access points to work).
Next, take the framework-res.apk / res / xml / storage_list.xml file from the base framework and replace it with the file in the donor framework (the drive mounting paths are written in the file, without replacement you most likely will not see the SD card, the PC will not be mounted Yes, and just do the firmware may not boot).
We compile the revised framework-res.apk
2.Open build.prop from your base firmware, look for the line in it
ro.telephony.ril_class = xxxxxxxxx

where xxxxxxx is your ril. We are looking for this file in the previously parsed telephony-common.jar along the path \ smali \ com \ android \ internal \ telephony \
We parse the telephony-common.jar file from the donor’s firmware and add (replace) this file from the base firmware, assemble the framework back.
3.We take the edited files
framework-res.apk
telephony-common.jar

and put them in the system / framework / donor folder.

* Delete the folder from the base
system / app /
system / fonts /
system / framework /
system / media /
.
We put the same folders from the donor’s firmware into the database.
P.S.I recommend to leave the file system / app / Gallery2.apk from your CM10 / 10.1 - otherwise there may be problems with the camera (not always, but it happens)


* Go to the system / xbin folder of the donor, take the files
busybox
shelld
su

and add / replace them in the xbin database.


* Go to the donor's system / bin folder, take the file
installd

and replace them in the bin folder of the base.


* Go to the system / lib / donor folder, take the files
content-types.properties
libaudiofp.so
libdigit_ocr.so
libDmplayer.so
libembed_thunder.so
libembed_thunder_manager.so
libffmpeg_armv7_neon.so
libffmpeg_xm.so
libffplayer_jni.so
libfile_scanner.so
libFreqFilter.so
libimageprocessor_jni.so
libimageutilities_jni.so
libjni_resource_drm.so
libjni_resource_patcher.so
libkeygen_jni.so
liblbesec.so
liblocSDK3.so
liblocSDK_2_5OEM.so
libMiuiGalleryJNI.so
libmp3lame.so
libNativeApi.so
libpatcher_jni.so
libphotocli.so
libPlayer_jni_armv7_neon.so
libshell.so
libshell_jni.so
libshellservice.so
libxl_common.so
libxldpbrothers.so
libmiui_security.so
libmiui_chromium_support.so
add them to the lib folder of the database.
P.S. Libraries can change, so see the exact list on the githaba:
For 4.1https://github.com/MiCode/patchrom_miui/tree/jellybean/HDPI/system/lib
For 4.2https://github.com/MiCode/patchrom_miui/tree/jellybean42/HDPI/system/lib


* Go to the system / etc / donor folder, take the files
Folder "license"
huangli.idf
mdb_pub.key
mdbversion
permission_config.json
pinyinindex.idf
telocation.idf
yellowpage

add them to the base etc folder.
From the system / etc / permissions / folder we take files
com.google.android.media.effects.xml
com.google.widevine.software.drm.xml
com.google.android.maps.xml

add to the database.


* Open the build.prop base CM looking for strings
ro.build.version.incremental = enter the version of MIUI here, for example 4.1.24
ro.config.ringtone = delete
ro.config.notification_sound = delete
ro.config.alarm_alert = delete

Add to the end of build.prop
ro.miui.ui.version.code = 3
ro.miui.ui.version.name = V5
ro.config.ringtone = MI.ogg
ro.config.notification_sound = FadeIn.ogg
ro.config.alarm_alert = GoodMorning.ogg
ro.config.sms_received_sound = FadeIn.ogg
ro.config.sms_delivered_sound = MessageComplete.ogg



* Unpack your boot.img, look for the init.rc file and add the shelld service to the end of the file


service shelld / system / xbin / shelld
class main

(Before class main there should be a tab -in notepad ++ press "tab", then we write class main)

Attention!If you are working with Android 4.2.2, then you need to fix the bootclasspatch. We are looking for a string in init.rc
export BOOTCLASSPATH

and add to it
/system/framework/framework_ext.jar:

We collect boot.img back.


* Open the file \ META-INF \ com \ google \ android \ updater-script and add, almost to the very end of the line
set_perm (0, 1000, 06750, "/ system / xbin / shelld");

It turns out like this:
set_perm (0, 0, 06755, "/ system / xbin / procmem");
set_perm (0, 0, 06755, "/ system / xbin / procrank");
set_perm (0, 1000, 06750, "/ system / xbin / shelld");
set_perm (0, 0, 06755, "/ system / xbin / su");
show_progress (0.200000, 0);
show_progress (0.200000, 10);



At this, the manipulations with the database archive end and the most interesting begins :)



* We flash the received archive, turn on the phone, connect it to the PC and launch LogCat. If the phone boots up - you are incredibly lucky :), but this happens rarely.
In general, the situation is this: the phone does not load, it fell into the so-called bootloop. We look carefully at the logcat and look for an error, this error will be repeated cyclically. For clarity:


Attached Image

This is the error itself:
E / JNIHelp (709): RegisterNatives failed for 'android / view / GLES20DisplayList', aborting

We will correct the situation :)

* We decompile framework.jar from the resulting firmware, follow the path specified in the "framework.jar / android / view /" error and look for the GLES20DisplayList.smali file and compare it with the file from the framework.jar of our base firmware (remember, we decompiled it into the beginning).
Attached Image

Now add the missing lines from the base firmware file to our port file
IMPORTANT !!!: Add only the missing lines, no need to replace the lines !!!


More important !!!
Everything is said figuratively, because it is unreal to explain all the nuances.
I strongly recommend to get acquainted withby thispost and try to understand a little bit what and how it works!


* We compile the edited framework, flash it into the phone. To simplify the task, here is the archive for CWMAttached filetest.zip(191.63 KB)
We put the compiled framework.jar in the archive along the desired path, we drop it on the memory card, we flash through CWM. Next, turn on the phone, connect to the PC, run LogCat and watch again. If the phone started up - lucky, if not, then again we are looking for a recurring error, decoupling the already fixed framework and correct this error by the same principle. We continue until the device starts.


* I think the overall picture is more or less clear, then I will try to paint some dirty tricks.



P.S Starting with Android 4.2.2, adb requires authorization. Therefore, when you first start the firmware, you will not see any Logcat. This is not good, because the firmware with a 95% probability on the first attempt will not start. There are several ways out, perhaps the easiest:
First of all, we install our CM10.1, boot up, enable USB debugging, authorize the device. Next, without any wipes we roll your firmware port - we look at Logcat.



Automatic porting (What technology reached)
ATTENTION! Port using the program does not give you any 100% certainty, because things can always go wrong
As a "base"desirable CyanogenMod with SELinux disabled
>>>>>>>>>Download utility <<<<<<<<<
Instruction:
1. Unzip the archive to hard disk
2. Make sure the folder isdonor The proper files from miui are lying (! necessarily the same version of the android!) [Copy the stock Storagelist.xml / powerprofile.xml that are in / res / xml (you can open framework-res.apk just as an archive)]
3. [TickDRM Patch if you do not want to patch the kernel yourself and Remove NFC if your device does not support it]
4. SelectDPI
5. Apply Patches - I think I don’t need to translate
6. Magic. You can pick up the parcel inbase
Note buttonwipe will bring everything to its original form
---
For the program, thanks to the wonderful man Tquetski @ miuicom


Please do not turn the topic in the order table. The topic discusses the errors received and how to solve them.


There is no curator in the subject. For questions about filling caps, please contact the section moderators via the "Complaint" button under the messages to which you want to add links.
If there is a user in the subject who wants to become a Curator and the correspondingRequirements for candidates, he can apply in the topicI want to be curator(after having studied the topic header and all materials for curators).


Post has been editedNatacha - 09.07.15, 16:18
Reason for editing: A small addition)
Contrds
Message#1442
21.12.18, 09:18
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 95
Check in: 10.03.16
Xiaomi Redmi 4A

Reputation:-  9  +

I would like MIUI Notes ported: D


--------------------
CODE, Android DEV, Java
Oleshkin_547
Message#1443
12.01.19, 10:30
Novice
***
[offline]

Group: Active users
Messages 43
Check in: 28.11.18
Huawei P9 Lite VNS-L21

Reputation:-  6  +

Drop the file for automatic porting
Zveka
Message#1444
28.01.19, 19:13
Old resident
*******
[offline]

Group: Curators
Messages 944
Check in: 11.03.12
ZTE Nubia Z11 Mini

Reputation:-  225  +

What can I choose a donor for a phone on the 617 dragon?
there is a MIUI 9, collected by the Chinese, I want 10ku.

73 pagesV  « < 71 72 73 » 


 mobile version    Now: 04/30/19, 22:35