Quantcast
Channel: xda-developers - Android Software and Hacking General [Developers Only]
Viewing all articles
Browse latest Browse all 3614

[GUIDE] How to Build TencentOS for any Device [GUIDE]

$
0
0

TencentOS is an aftermarket firmware designed by the Chinese company Tencent. Tencent also created the QQ and WeChat IM services.

TencentOS, just like MiUi is not open source. However, Tencent has provided a version of PatchRom for you to use called TOSPlus. I have tested this on the Samsung Galaxy Star Pro. The guide for the TencentOS PatchRom is different than the MiUi and LewaOS and it is written in Chinese only. I will be writing a guide in English so that more people can port this great ROM to their devices.

Step 1:
Make sure you are on a version of Ubuntu 14.04 or greater (16.04 may or may not work).

Step 2:
Now you need to make a copy of the TencentOS PatchRom. Change to whatever directory you want and Type:
Code:

git clone https://github.com/TOSPlus/TPS
This will make a folder called TPS in whatever directory you were in before. The TPS folder will contain all of the code required to build TencentOS for your device.

Step 3:
Change the directory to TPS and type:
Code:

source build/envsetup.sh
This will initiate the build process.

Step 4:
Next, you build the directory for your device. Type:
Code:

make create brand=put-manufacturer-name device=device-model
Replace "put-manufacturer-name" with your manufacturer and replace "device-model" with your device model.

Step 5:
Next you need to copy a zip file of a ROM you want to use as your base into your device model folder. Name the zip file to ota.zip. Make sure the base ROM is android 4.3 or above.

Step 6:
Now, you configure the build. Type:
Code:

make config=device-model
Replace device-model with your device's model.

Step 7:
Once you have that done, you need to edit a few files. Those files are misc_info.txt, remove_files.list, tos_system_files.ignore, and build.prop. You can find all of the files underneath the config folder within your device-model folder.

In misc_info.txt, you need to change blocksize, boot_size, recovery_size, system_size, userdata_size, and cache_size to match your device. You can find these in the BoardConfig.mk of your device.

In remove_files.list, you add the files that need to be removed so that TencentOS can function fully. This usually takes quite a bit of trial and error to get correct.

In tos_system_files.ignore, you designate which files should not get edited when you are patching the different services.

In the build.prop, you need to add the TencentOS properties.
example (for the gt-i9500):
ro.qrom.beaconkey=0M000V5PH01B6QQD
ro.qrom.product.device=ja3g
ro.qrom.product.device.brand=samsung
ro.qrom.build.brand=tos
ro.qrom.build.os=android4.4.2
ro.qrom.otapath=/data/media/0
qrom_disposeIcon_enable=1
qrom_permission_enable=1
# ro.qrom.build.version.snflag=ADRQRTOS
ro.qrom.build.version.snver=01
#need edit ro.qrom.build.version.day=151028
ro.qrom.build.version.name=ADRQRTOS01_M
ro.qrom.build.version.number=01151028
ro.qrom.build.version.type=M
#need edit ro.qrom.build.number=3
ro.qrom.build.lc=A1B2C3000D4E5F6
ro.qrom.build.lcid=99
#need edit ro.qrom.build.date=Wed OCT 28 21:01:25 CST 2015
ro.qrom.build.date.utc=1446014851
ro.qrom.build.type=mod

Everything that says need edit, you need to edit for your device specifically.

Step 8:
Copy file_contexts from the boot.img and put in the config folder.

Step 9:
Copy recovery.fstab from the recovery.img of your device to the config folder

Step 10:
Next, you need to extract all of the files from the ota.zip and put them in the correct place. To do that, type:
Code:

make prepare
Step 11:
Now, you can patch your ota.zip. type:
Code:

make patch
If there are any failed patches, you have to patch those smali files manually.

Step 12:
After patching has been done, type:
Code:

make repack
It repacks the jars and frameworks required that TencentOS has edited.

Step 13:
You made it :) this is the final step. Type:
[CODE]make package[/B]
It will create a zip file of TencentOS for your device model.

Then you can flash it in a custom recovery and enjoy your new ROM :)

Viewing all articles
Browse latest Browse all 3614

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>