Building MIUI for Nexus 6p - Nexus 6P General

This is how to build a functioning MIUI 8 port for the Nexus 6P.
To start, use Ubuntu 16.04 64-bit. Dependencies will change if you use a different version
Run these commands in the terminal to get all the pre-requisites.
Code:
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop maven openjdk-8-jdk pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline6-dev lib32z1-dev
From cyanogenmod wiki:
Ubuntu 16.04 (Xenial Xerus) or newer and OpenJDK: Since OpenJDK 1.7 was removed from the official Ubuntu repositories, you have a couple options:
1. Obtain OpenJDK 1.7 from the openjdk-r PPA
2. Enable experimental OpenJDK 1.8 support in CyanogenMod 13.0 (not available in earlier version). To enable OpenJDK 1.8 support, add this line to your $HOME/.bashrc file: export EXPERIMENTAL_USE_JAVA8=true.
You'll have to have to have android SDK installed as well.
http://developer.android.com/sdk/installing.html
Be sure to add the sdk tools to your path.
Once you have the tools added to your path, head over to github and make a free account.
Once you have a free account you'll be able to download the source for patchrom.
Open terminal again and run these commands.
Code:
mkdir patchrom
This will make a directory called patchrom
Code:
cd patchrom
This will put you into that directory
Code:
repo init -u git://github.com/MiCode/patchrom.git -b marshmallow
This will sync the directory with the latest tools and source
This is where you will be asked to sign into your github account.
You'll need to take into consideration which base ROM you would like to use to build MIUI.
I recommend building MTC20L pre-rooted, if you have the time and resources.
Otherwise, find a ROM that is pre-rooted and has a single system.img. This will make the process a lot easier.
If you find that the ROM has system.dat, among other system files, then you might consider another ROM.
Now, you'll need to copy a few files from the ROM. (or you can run make workspace in the same directory as stockrom)
framework.jar services.jar telephony-common.jar and wifi-service.jar
These should all be located in the /system/framework/ of the ROM you chose.
Decompile these with apktool.
The decompiled folders should be labeled
framework.jar.out services.jar.out telephony-common.jar.out and wifi-service.jar.out respectively.
Back to building.
You'll notice that there is already an angler folder located inside of the patchrom directory. This is a very old base, and does not boot without modification.
That is why we are building from a different ROM, and with a slightly different method than found on the patchrom github.
Remove everything from the /patchrom/angler/ folder
Place all of the decompiled folders into this directly, and make sure they are named appropriately.
Place the ROM you chose as a base in this directory as well.
Rename the ROM to stockrom.zip - This is important for the makefile
The makefile found in the github prokect is a start, but you'll need to make your own. You can ask for more help with that in this thread.
~ https://github.com/MiCode/patchrom_angler/blob/marshmallow/makefile ~ Use this for ideas. Yours will not be identical
Using @STRYDER~007 's words to better understand the makefile
"Explanations:-
'local-zip-file' = Name of your original Base ROM zip
'local-out-zip-file' = Name for your finished MIUI rom
'local-modified-apps' = Apps that will be modified to fit in with the framework. They need to be modified because they contact with the system
'local-remove-apps' = Apps that will be removed from the original ROM
'local-pre-zip' = Refers to code-block that should be executed before the zip is done.
'local-after-zip' = Refers to code-block executed after the zip is completed
'local-zip-misc' = The code-block just described at 'local-pre-zip'. It adds some Google Apps and a build.prop
'local-test' = Another code-block"
Once you have a makefile established you can move on to your first build.
Open the terminal again
Code:
cd patchrom
. build/envsetup.sh
cd angler
make workspace - (if you didn't manually decompile)
make firstpatch
This will vary in length depending on your machine
Once that has completed you'll need to look through the /patchrom/angler/temp/rejects/ folder and the terminal to find all of the manual patches that you'll need to apply.
Here is the tutorial that I used - http://forum.xda-developers.com/chef-central/android/guide-patchrom-rejects-fixing-tutorial-t3203287
After you have successfully manually patched everything, you can run the final command in the terminal for now
Code:
make fullota
This will create a file called fullota in the /patchrom/angler/ directory.
You can test to see if it will boot. You will still need to flash the vendor file that matches your stock rom of choice.
At the time I built, some extra modifications needed to be made to the boot.img
I used @superR 's kitchen to decompile the boot.img - http://forum.xda-developers.com/chef-central/android/kitchen-superrs-kitchen-t3202296
Set the current status to the following (unless you prefer otherwise)
Add/Remove init.d support: Enabled
Insecure/Secure: Insecure
Remove dm-verity: Disabled
Add/Remove forceencrypt: Disabled
In short, make sure every option appears green, rather than red.
Now, you can repack the boot.img and put it back into the ROM
You should now have a booting MIUI 8 for the Nexus 6P that you built!

As some of you know, I have been working on building MIUI for the Nexus 6P for a while now.
Here is that thread where you can track progress. I was building manually, since patchrom was still on 4.4.4 at that time.
Now, Patchrom is finally on 6.0!
Here is that updated version.
If anyone would like to contribute to that project, please do!
They are a little bit behind. In my thread, we were able to get to the boot animation.
Meanwhile, building from source is still trying to get to that point.
So, please, contribute to the project!
Things to consider before building:
Patchrom is updated to marshmallow. The whole angler tree isn't added yet. You can figure it out though.
The Mi Note Pro has an 810 but is still on 5.1
The Zubia z9 max has an 810, and is on 5. MIUI 7
The oneplus 2 has an 810 and is on 5.1.1. MIUI 7
The Mi 5 has a similar, but not exact, chip. The snapdragon 820. MIUI 8 for the Mi 5 is on 6.0.1+
CM13 can work as a base.
AOSP can work as a base. (I recommend this method)
Finding a Base/Port
List of Snapdragon Devices
MIUI 8 Global Supported Devices
Resources:
Patchrom - angler
Building with patchrom - old
fix patchrom rejects
Previous XDA Thread
Tutorial
En.MIUI Tutorial
MIUI Qualcomm big fixes
MIUI port tutorial By @STRYDER~007
xiaomi.eu porting forum
Old Port INFO
My latest Logcat - "adb logcat -v long"
CYGWIN method
Logcat info
How to: Qualcomm specific
Note Pro forum Check for leaks/relevant info
Note Pro kernel source
How to port a ROM. Not MIUI specific
Note Pro/MIUI Tweaking Thread
Tools:
SuperrsKitchenUnzip ROM, Deodex, reZip, decompile .imgs, recompiles .imgs
Notepad++ Advanced text editor
Notepadqq Linux alt. For Notepad++
Meld To compare files
APKtool (De)compile apk files
Pastebin Site to dump logcats
Threads about MIUI - Nexus 6P specific:
Request
Request
Request
Request
Request
Request
Request
Development

Anyone interested in ideation? I could use a hand with the project.

I would really love to help, but I just don't have the time for it.. I could test some builds or something though.

Good news, everybody!

tr4nqui1i7y said:
Good news, everybody!
Click to expand...
Click to collapse
Can I test the bootable port...? PM me please

thatkindaguy said:
Can I test the bootable port...? PM me please
Click to expand...
Click to collapse
Yea, it's in the OP. It's available for everyone to test.
http://forum.xda-developers.com/nexus-6p/general/miui-8-alpha-t3442570/page23

Thank you @tr4nqui1i7y for putting all your time and effort in this.

mbl1979 said:
Thank you @tr4nqui1i7y for putting all your time and effort in this.
Click to expand...
Click to collapse
Thanks for staying patient. :silly:

NP bud.

OP updated to include patchrom method in near-full detail.

I'll update the OP with more info in the future. For now, it should be enough to get started.

Working on adding a few steps to the OP.
WARNING the op doesn't show all the steps when using xda labs app. Open in a browser to be sure you're seeing everything.

I'm downloading the equivalent of MTC20L for nexus 5x (MTC20K) and i can't find it pre rooted it's fine if I use the plain factory image?
And can you also share your makefile as I'm trying to build miui using a base that it's 99% similar to yours

can you elaborate further about modification in boot.img
instruction are not clear about how to mod boot.img
any specific files like miui.rc or miui8.rc you have added?
and why every marshmallow base does not generate a bootable rom why only some specific base?

What ROM did you use as a base? I mean for MIUI 8 for 6P
Sent from my Nexus 5X using Tapatalk

Related

Starting with cyanogen mod for nexus one

This is only for system files, the instructions for kernel making will come as soon as i get some time.
Credits (these people helped me build form source the first time and created some awesome wiki at wiki.cyanogenmod.com)
Cyanogen
Maxisma
Chris Soyars
Kmobs
thedudesandroid
rikupw
pershoot
bcrook
and many more if i have missed just tell me
If u want to learn building from source, cyanogenmod is the best place to start with. What u need is UBUNTU/DEBIAN , i would recommend start with ubuntu as i find it the best to start with it. U should have atleast 20gb of storage in ubuntu. U can use a virtual machine or full OS anything which suits u.
To start with nexus one
Making ur computer ready to build
1. sudo aptitude install git-core gnupg sun-java6-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
2. If u have 64 bit version add this (only for 64bit)
sudo aptitude install ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib
3. cd ~
4. mkdir bin
5. cd bin
6. echo $PATH
Here i would recommend editing ur .baschrc in your home directory. It is a hidden file so u have to edit it in terminal using command gedit .baschrc
and adding a line to the last line export PATH=$PATH:~/bin
Now u have to setup repo
1. curl http://android.git.kernel.org/repo >~/bin/repo
2. chmod +x ~/bin/repo
This is for obtaining the source
1. Open Terminal
2. cd ~
3. mkdir cm-build
4. repo init -u git://github.com/cyanogen/android.git -b eclair
5. repo sync
Wait for the repo to sync as it is really huge around 2.5 gb
After the sync has completed u have to create the environment
1. cd cm-build
2. . build/envsetup.sh
Builiding ADB - Do it only if u havent already built it. Most probably u havent
make -j3 adb
now add the path of adb directory of adb like u did for bin. adb will be in the out folder in folder cm-build
Now configure your build
select the build u want to make, list using this command
1. sed -n -e "s/^add_lunch_combo//gp" vendor/*/vendorsetup.sh
2. lunch cyanogen_passion-eng
Get properitery files from ur devices- dont skip this step. U need to have adb setup. And if u are unable to get the files ur build will not complete. i will upload a folder with properitery files today with instructions how to place them so if u r unable to get them u can use those files
1. cd ~/cm-build/vendor/google/passion
2. ./extract-files.sh
Now the final step building
make -j3
The -j flag specifies how many threads the compiler should use. Rule is # of processors+1
its gonna take time for the first time u build so just relax somewhere, go eating, watch Movies, use google video
all the files will be in
~/android-cm/out/target/product/passion
u can use fastboot to flash those files and test the build
If u have any problems while building just let me know with the error where it as stopped. using the command make-clean solves most issues but it will make u build from scratch again thus building will take the same time as it took while building the first time as it clears all the prebuilt files
If u find anything to correct in this wiki let me know i will do it
More to come
1. Kernel compiling
2. making update.zip
Thanks for the guide, man.
BTW, I noticed you used java 6 in your instructions, which is good, because the official Android source (not cyanogen's) requires Java 5, which is outdated and conflicts with the version required for my ROM kitchen.
JAVA 5 is more compatible coz java 6 doesnt support overriding, anyways if anyone has problem of overriding commands use java5
sudo aptitude install sun-java5-jdk
and yes obviously java 6 is better but java5 is best for compiling with android, its just ur wish what suits u best
UPDATE: built this time using java6 and it built fine. If u r using the android repo instead of CM use java5 . If u have both installed u can switch versions using
sudo update-alternatives --config java
select any version u want
i will be updating the post with kernel making and bcm4329.ko, just didnt get time
charnsingh_online said:
JAVA 5 is more compatible coz java 6 doesnt support overriding,
Click to expand...
Click to collapse
You might be mistaken about overriding.
Some people had problems with override annonation with java6, if u have those problems java5 is best coz repairing and finding errors i find it time consuming so better switch versions.
charnsingh_online said:
Some people had problems with override annonation with java6, if u have those problems java5 is best coz repairing and finding errors i find it time consuming so better switch versions.
Click to expand...
Click to collapse
You can still install Java 5 and 6 concurrently on your LINUX box. Just set the JAVA_HOME and PATH environment variables to point to the Java version you want to use for a particular application.
On my box I make Java 5 the default, and when I want to use Java 6 (e.g. when cooking) I just source a file with the new variables set.
yeah i gave the instructions how to shift java versions, i too have 2 versions of java installed
charnsingh_online said:
yeah i gave the instructions how to shift java versions, i too have 2 versions of java installed
Click to expand...
Click to collapse
Good work! As soon as I have some spare time I'll try out your instructions and possibly help you out with the Nexus One video recording issue.
THX BRO, JUST pm me or reply me on twitter when u get time
Question on workspace location
I have a question when it comes to WHERE you put your workspace to do development. The instructions refer to your home directory. I would prefer to put EVERYTHING within a sub-directory (or any directory for that matter) instead of all these directories being created off my home directory (I like to keep it clean). I followed your instructions and Google's instructions and it creates: bin, bionic, bootable, build, cm-build, cts, dalvik, development, external, frameworks, hardware, kernel-msm, Makefile, packages, prebuild, sdk, system, and vendor.
So, can I undo what I did and re-create my workspace in a different location? Or, is it specific to the home (~) directory so the scripts work?
BTW, how do I undo the creation of these directories and access to the source repository? Just a simple "delete" of the directories and files?
Sweet guide! Will check this out soon!

Questions about Android source code for N1

Hi,
Followed cyanogen's instruction in his wiki, I could build and flash my own ROM to N1, and it is working. Thanks cyanogen so much for everything he has done with Android.
However, the instruction is based on cyanogen's source code. Now, I am trying to figure out how to build a new ROM from pure Android source code (i.e. the one from AOSD).
I obtained the eclair branch as follows:
Code:
repo init -u git://android.git.kernel.org/platform/manifest.git -b eclair
repo sync
My questions are:
1. There is not any directory under ./vendor for N1 (i.e. passion). I can see only directories for Dream & Sapphire. Does it mean I can build only ROM for Dream/Sapphire? The following result seems support that point. Did I misunderstand some points?
Code:
$ sed -n -e "s/^add_lunch_combo//gp" vendor/*/vendorsetup.sh
aosp_emulator_us-eng
aosp_emulator_eu-eng
aosp_dream_us-userdebug
aosp_dream_eu-userdebug
aosp_dream_us-eng
aosp_dream_eu-eng
aosp_sapphire_us-userdebug
aosp_sapphire_eu-userdebug
aosp_sapphire_us-eng
aosp_sapphire_eu-eng
2. There is not extract-files.sh there. So I suppose I need to use the file from cyanogen. But what else should I do to be able build a new ROM?
Any help is really appreciated!
I'm just as clueless as you are to this--but when I compiled for the HTC Touch, all I did was pull down the stock AOSP build (repo sync) and simply ran "make" from the root directory, which produced a blank System image.
From there, I either copy & pasted the compiled library .so files into the image (to provide driver support), or if necessary to have the source compiled for the version, I included the source into the repo sync directory and ran the "make" which would also produce a compiled library.so that functioned.
Not sure any of this will help, but I figured I'd offer what I could.
Shidell said:
I'm just as clueless as you are to this--but when I compiled for the HTC Touch, all I did was pull down the stock AOSP build (repo sync) and simply ran "make" from the root directory, which produced a blank System image.
From there, I either copy & pasted the compiled library .so files into the image (to provide driver support), or if necessary to have the source compiled for the version, I included the source into the repo sync directory and ran the "make" which would also produce a compiled library.so that functioned.
Not sure any of this will help, but I figured I'd offer what I could.
Click to expand...
Click to collapse
Thanks Shidell. So you meant that it worked for your HTC Touch?
How do you copy & paste library files into image?
How do you include the source into the repo sync directory?

[All In One Guide for Dummies] Porting ROMs/Building CM7 from Source/Themes |80% Done

Here you have it people , I may be wrong at some places so please excuse me
Requirements :
winzip
any file explorer on your desktop
2 ROMs ( one of X10 and other )
Suggestions :
Use ROMs from Phones like NexusOne , HTC Desire
all phones with QSD8250 and Adreno 200
Method:
Just do these changes to the files and have a Port which boots up
Delete :
/data folder
boot.img
/system/etc/firmware
/system/etc/init.d
Copy & Paste :
in /system/bin -
akmd2
am
bmgr
chargemon
charger
fix_permissions
hci_qcomm_init
hci_attach
ime
input
monkey
pm
port-bridge
qumxd
rild
updatemiscta
wlanmac
wlantool
ramdisk.tar/.gz
/system/etc :
replace all files in -
bluetooth
dhcpcd
wifi
firmware
copy the files -
apns-conf.xml
dbus.conf
DualMicControl
gps.conf
hosts
init* files
media-profiles.xml
resolv.conf
sensors.conf
sysctl.conf
vold.fstab
/system/lib folder :
delete and replace all files in:
/system/lib/modules
/system/lib/hw
copy the following files
in /system/lib/egl :
All EXCEPT libGLES_android.so
copy & replace these files :
libauth.so
libcm.so
libdiag.so
libdbus.so
libdss.so
libdsm.so
libgsl.so
libgstk_exp.so
libmiscta.so
libmmgsdilib.so
libmmipl.so
libmmjpeg.so
libnv.so
liboem_rapi.so
liboemcamera.so
liboncrpc.so
libpbmlib.so
libqmi.so
libqueue.so
libril.so
libril-qc-1.so
libuim.so
libwms.so
libwmsts.so
/system/usr/keychars -
es209ra_keypad.kcm
and delete the original file (example : passion_keypad.kcm OR bravo_keypad.kcm)
/system/usr/keylayout -
es209ra*.kl
do the same as with.kcm
Replace :-
Build.prop
META-INF folder
Cautions :-
Use the same version of android to port
You will need to change the build.prop to whatever you desire
You may need to edit the update-script
Porting gets over here !!!!!
WAIT I'll Complete it later
Many People want to know this right ?
Bro , Dude , Buddy , friend , mate WHICH FILES ARE FOR WHAT ??
what does akmd2 do ? what is it for ????
Here , I will try to provide you as many answers as I can :-
# Prebuilt kl keymaps
/system/usr/keylayout/es209ra_keypad.kl
/system/usr/keylayout/es209ra_handset.kl
/system/usr/keychars/es209ra_keypad.kcm.bin
## RIL related stuff [Responsible For GSM/DATA and Sim card]
/system/lib/libril.so
/system/bin/port-bridge
/system/bin/qmuxd
/system/lib/libauth.so
/system/lib/libcm.so
/system/lib/libdiag.so
/system/lib/libdll.so
/system/lib/libdsm.so
/system/lib/libdss.so
/system/lib/libgsdi_exp.so
/system/lib/libgstk_exp.so
/system/lib/libmmgsdilib.so
/system/lib/libnv.so
/system/lib/liboem_rapi.so
/system/lib/liboncrpc.so
/system/lib/libpbmlib.so
/system/lib/libqmi.so
/system/lib/libqueue.so
/system/lib/libuim.so
/system/lib/libril-qc-1.so
/system/lib/libwms.so
/system/lib/libwmsts.so
## Camera proprietaries
/system/lib/liboemcamera.so
/system/lib/libmmjpeg.so
/system/lib/libmmipl.so
/system/lib/libcamera.so
/system/lib/libopencore_common.so
## FIRMWARE
/system/etc/firmware/yamato_pfp.fw
/system/etc/firmware/yamato_pm4.fw
/system/etc/firmware/camfirm.bin
## ATHEROS WIFI [ WIFI modules for X10 ]
/system/lib/modules/athwlan.bin.z77
/system/lib/modules/data.patch.hw2_0.bin
/system/bin/wlan_mac
/system/bin/wlan_tool
## BT proprietary [ Bluetooth for X10 ]
/system/bin/hci_qcomm_init
/system/bin/hciattach
## Adreno 200 files [ Responsible for display i.e. the GPU ]
/system/lib/libgsl.so
/system/lib/egl/libGLESv1_CM_adreno200.so
/system/lib/egl/libq3dtools_adreno200.so
/system/lib/egl/libEGL_adreno200.so
/system/lib/egl/libGLESv2_adreno200.so
## Other libraries and proprietary binaries
/system/etc/vold.fstab [ SD Card ]
/system/etc/sensors.conf [Proximity sensors , etc]
/system/bin/akmd2
#offline charger
/system/bin/chargemon
/system/bin/updatemiscta
/system/lib/libmiscta.so
#hw [The lights between the HOME , Menu and back button ]
/system/lib/hw/copybit.qsd8k.so
/system/lib/hw/sensors.default.so
HOW TO MAKE THEMES
There are 2 types of themes you can make :-
1.Involving systemUI.apk and framework-res.apk
2.Involving the T-mobile Theme engine
I will begin with LEVEL (1)
There are two ways of doing this as well
1.Classic Way
2.The spaarc's cheap way (I use this one )
CLASSIC WAY
Requirements :-
1.A cool head
2.Apk Manager 4.4 (OR any APK editor , etc )
3.Original Framework-res.apk and SystemUI.apk
4.Themed Framework-res.apk and SystemUI.apk
OR
4.Many .PNG Images , In order to theme
Method :-
1.Use apk manager to decompile the original AND Themed apk's(i.e If you have a themed one)
2.ONLY Replace files found in /res/drawable-hdpi folder
3.ReCompile
4.Just replace Using RootExplorer or make a update.zip
Spaarc's Cheap Way
This is top secret , but i will tell it you
Requirements :-
1.Computer
2.7-zip
3.Original Framework-res.apk and SystemUI.apk
4.Themed Framework-res.apk and SystemUI.apk
OR
4.Many .PNG Images , In order to theme
Method :-
1.Use 7-zip to extract the apk
2.Replace files
3.Repack as zip using 7-zip again
4.Rename to ".apk"
5.Replace and Enjoy
T-MOBILE THEME CHOOSER
Follow this AWESOME guide
I don't have the time or patience of rewritting it in my cheeky tongue
Here , this completes your themeing guide
If you have any questions just Drop me a PM
HOW TO COMPILE CM7 ROMS FROM SOURCE
I have written this guide only for linux Users
Bibliography -
1.source.android.com
2.wiki.cyanogenmod.com
The guide starts here :-
Install the ADB
Install the Android SDK.
2.Install the Build Packages
Install using the package manager of your choice:
For 32-bit & 64-bit systems:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
For 64-bit only systems:
sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
NOTE: gcc-4.3-multilib g++-4.3-multilib is no longer available for Ubuntu 11.04 64-bit, but should still build without issue.
NOTE: On Ubuntu 10.10, and variants, you need to enable the parter repository to install sun-java6-jdk:
sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"
This will get you all the resources you need to build your CyanogenMod ROM
3.Create the Directories
You will need to set up some directories in your build environment.
To create them:
mkdir -p ~/bin
mkdir -p ~/android/system
4.Install the Repository
Enter the following to download make executable the "repo" binary:
curl https://github.com/spaarc/tools_repo/repo > ~/bin/repo "OR" curl https://github.com/spaarc/tools_repo/blob/master/repo > ~/bin/repo
chmod a+x ~/bin/repo
NOTE: You may need to reboot for these changes to take effect.
Now enter the following to initialize the repository:
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync -j16
5.Copy proprietary files
NOTE: This only needs done the first time you build.
You will need to have a Xperia X10 with a working copy of CyanogenMod install and ADB working on the computer. This script will copy the proprietary files from the device.
Connect the device to the computer and ensure that ADB is working properly.
cd ~/android/system/device/SEMC/es209ra/
./extract-files.sh
NOTE: If some hardware isn't working, like camcorder or FM radio, you will need to find the updated prop blobs.
6.Download RomManager
NOTE: This only needs to be done when an update to RomManager is released. If you are-up-to date, you may skip to Building CyanogenMod.
Download RomManager which is needed by the build:
~/android/system/vendor/cyanogen/get-rommanager
7.Building CyanogenMod
Check for updates
First, check for updates in the source:
cd ~/android/system/
repo sync
Configure Build & Compile
Now, the environment must be configured to build and the ROM compiled, from code, for the Xperia X10
. build/envsetup.sh && brunch es209ra
Install
Copy your .zip file from ~/android/system/out/target/product/es209ra/update.cm-XXXXX-signed.zip to the root of the SD card.
Optional: Download Google Apps for CyanogenMod 7 and place it on the root of the SD card.
Flash both of these .zip files from recovery.
reserved 4
reserved last
Awesome my friend, keep it up, good to see another dude, which are trying to help our X10 community .
Thnx a lot Spaarc bro.... u r gr8 coz u help
Sent from my X10i using XDA App
thanks sparc that will help people like me who wants to develop and play with android and with the xperia
That is nothing ,
The first post is incomplete
I also have to write how to compile Aosp ROM s
Which files are for what , which you r porting
I also have to write how to code those sources which u can see at github ...
There is a lot , how to make themes ...
sent from my Android powered smart phone
spaarc said:
That is nothing ,
The first post is incomplete
I also have to write how to compile Aosp ROM s
Which files are for what , which you r porting
I also have to write how to code those sources which u can see at github ...
There is a lot , how to make themes ...
sent from my Android powered smart phone
Click to expand...
Click to collapse
Why dont you type it up on notepad or ms word so you dont have to keep stopping and people than going it is only half complete and crap like that. If you type it all up in notepad then you can just copy/paste here and then it will all me done.
Just saying what I would do and just trying to help
Sent from my X10i using xda premium
I don't have time to do it that's why ...
I'll complete it in this week
I don't care what people say
sent from my Android powered smart phone
wow..nice tutorial man!!
thanx!
Main part of the guide is over
approx 2/3 left
Really really exhausted , TC and bring me new ROMS
Thanks can u do like a guide of porting roms from the phones with different gpu/cpu?
Paji tussi great hoo!!
Sent from my X10i using xda premium
#offline charger
/system/bin/chargemon
/system/bin/updatemiscta
/system/lib/libmiscta.so
Click to expand...
Click to collapse
is that all for offline charging?
i am working on integrating offline charger in main kernel ramdisk... so that it will be independent of all things in /system
If I can't do it how could I teach you ?
It is next to impossible
Bit still editing the init.rc in ramdisk should do the trick
sent from my Android powered smart phone
spaarc said:
If I can't do it how could I teach you ?
It is next to impossible
Bit still editing the init.rc in ramdisk should do the trick
sent from my Android powered smart phone
Click to expand...
Click to collapse
that and hex editing the files involved
Mate i need help have done this method with x10 2.3.3 and arc 2.3.4 and only copied the files u have said and i have UB with DK v5 the phone just reboots and reboots while on DK logo...
Shouldn't their be files from permissions folder?
sahibunlimited said:
Mate i need help have done this method with x10 2.3.3 and arc 2.3.4 and only copied the files u have said and i have UB with DK v5 the phone just reboots and reboots while on DK logo...
Shouldn't their be files from permissions folder?
Click to expand...
Click to collapse
No nothing more ,
Did you copy the ramdisk ?
Send me a logcat
sent from my Android powered smart phone

[GUIDE] [LINUX/UBUNTU] Extract/Modify/Rebuild Lollipop ROMs !

Extracting:
1. Download this package: https://tusfiles.net/oaiw9ze20tbl
2. Extract to a folder and chmod 777 -r /path/to/the/folder
3. cd (change directory) to that folder
4. Run prereq.sh
5. Place system.transfer.list and system.new.dat into the folder
6. Open extractor.sh using a text edit program
7. Find the line containing chown command, replace yash:yash with yourusername:yourusername
8. Run extractor.sh
9. Modify contents found in output folder​
Rebuilding:
1. Do above first and then run compress.sh
2. Find the rebuilt system.new.dat and system.transfer.list in sdat folder​
Making it into a ROM:
1. Do above first
2. Find a zip ROM for OnePlus 2 that contains system.transfer.list and system.new.dat
3. Replace it with your rebuilt ones from above mentioned steps
4. Voila! ROM ready!​
NOTE:
The package contains OxygenOS SELinux file contexts in progs subfolder...
So, to modify CM ROMs you need to get file_contexts file from the zip of the ROM and replace the one found in progs subfolder
Credits:
@xpirt
Please mention​
Two questions; Is this a rom kitchen like tool for OxygenOS? Are there any libs or binaries or other dependencies?
I'm a bit busy, but I'll take it for a spin when I can.
Oh one last thing, is there a repo for this?
Ta,
ALQI
Sent from me mobile.
Nice guide
alquimista said:
Two questions; Is this a rom kitchen like tool for OxygenOS? Are there any libs or binaries or other dependencies?
I'm a bit busy, but I'll take it for a spin when I can.
Oh one last thing, is there a repo for this?
Ta,
ALQI
Sent from me mobile.
Click to expand...
Click to collapse
The dsixda kitchen had much more functions then this but you may cknsidet it as a temporary lollipop kitchen with not much extra functionality..
This was like a automation script for me and was a quick one so repo wasn't needed
I have used this script on Ubuntu 64bit and the only extra dependency apart from those included in package are installed by prereq.sh
Btw this is not just for oxygen os it can also be used for any cm or cm based rom here but.do read the note then
Yash98 said:
Extracting:
1. Download this package: https://tusfiles.net/oaiw9ze20tbl
2. Extract to a folder and chmod 777 -r /path/to/the/folder
3. cd (change directory) to that folder
4. Run prereq.sh
5. Place system.transfer.list and system.new.dat into the folder
6. Open extractor.sh using a text edit program
7. Find the line containing chown command, replace yash:yash with yourusername:yourusername
8. Run extractor.sh
9. Modify contents found in output folder​
Rebuilding:
1. Do above first and then run compress.sh
2. Find the rebuilt system.new.dat and system.transfer.list in sdat folder​
Making it into a ROM:
1. Do above first
2. Find a zip ROM for OnePlus 2 that contains system.transfer.list and system.new.dat
3. Replace it with your rebuilt ones from above mentioned steps
4. Voila! ROM ready!​
Click to expand...
Click to collapse
So does this allow you to make ROM's for the OP2 from ROM's based on other devices, or what? Sorry if I'm sort of a noob, I just don't understand what is being done.
Thanks!
Me1256 said:
So does this allow you to make ROM's for the OP2 from ROM's based on other devices, or what? Sorry if I'm sort of a noob, I just don't understand what is being done.
Thanks!
Click to expand...
Click to collapse
You can make ROMs from prebuilt ROMs like OxygenOS or any other built ROM like Exodus, CM12, etc.
Basically modify ROMs without rebuilding from source (which takes a lot of time!)
Sir I downloaded your tool and followed ur guide....But after I run extract.sh there is no files/folders in output folder.Plz reply thankz in advancw
Thank you. I really wanted to extract .dat file..
Sent from my ONE A2003 using Tapatalk
This is a great tool but I wanted to know how to edit the system folder in ubuntu. Like using chmod and chown to pre-root and uninstall some other apps. Can somebody please direct me in that direction.
I go test...

How to Recompile the HP Touchpad Android Kernel

How to Recompile The HP TOUCHPAD Android Kernel for DirtyUnicorns 8.1 and Shumash SKZ DirtyUnicorns 8.1 and Evervol 7.1
This is done on a Linux OS (Ubuntu 18.04 x64). If you are using other OS, then install Linux as a virtual machine.
The process is the same for all Kernel, but I have only done it with the last two version of Android and can verify that it works.
You can get the kernel source code from other version and try to compile it.
You many need to install the following packages on your Linux OS:
sudo apt-get update
sudo apt install python-pip
sudo apt-get install libncurses5-dev libncursesw5-dev
To recompile the Kernel you need to download an arm cross compiler, there are two options, google android or Linaro.
Get the Android arm cross compiler here:
https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/+archive/26e93f6af47f7bd3a9beb5c102a5f45e19bfa38a.tar.gz
You can also use Linaro:
https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/armeb-eabi/gcc-linaro-4.9.4-2017.01-x86_64_armeb-eabi.tar.xz
Get the Kernel source for:
DirtyUnicorns:
https://github.com/DirtyUnicorns/android_kernel_htc_msm8960/archive/o8x-caf.zip
Shumash SKZ overclock Kernel for DirtyUnicorns 8.1
https://github.com/shumashv1/android_kernel-3.4_hp_tenderloin/archive/o-8.1.zip
Shumash SKZ overclock Kernel for Evervolv 7.1
https://github.com/shumashv1/android_kernel-3.4_hp_tenderloin/archive/ng-7.1.zip
1. Create a folder on your home directory
Code:
arm-eabi
2. Extract (unzip) the Android cross compiler file arm-eabi-4.8-26e93f6af47f7bd3a9beb5c102a5f45e19bfa38a.tar.gz into the arm-eabi direcory:
You should have the following directory structure
(Your ID will be different than ubuntu) but all the directories needs to have the following structure.
Code:
/home/ubuntu/arm-eabi/share
/home/ubuntu/arm-eabi/libexec
/home/ubuntu/arm-eabi/lib64
/home/ubuntu/arm-eabi/lib32
/home/ubuntu/arm-eabi/lib
/home/ubuntu/arm-eabi/include
/home/ubuntu/arm-eabi/bin
/home/ubuntu/arm-eabi/arm-eabi
3. Extract (unzip) one of the Kernel file that you will like to recompile into your home directory:
4. Rename the extracted folder ( example : android_kernel_tenderloin_DU_msm8960-o8x-caf )
to: kernel
It should have all folders under kernel directory
(Your ID will be different than ubuntu)
Code:
/home/ubuntu/kernel/crypto
/home/ubuntu/kernel/block
/home/ubuntu/kernel/arch
( and many more)
That is all that is need it to recompile, but the folder location and structure is very important for the scripts to work.
The configuration file to make the Kernel for the two versions of the touchpad is located in:
Wifi standard version
/kernel/arch/arm/configs/tenderloin_android_defconfig
4g version
/kernel/arch/arm/configs/tenderloin4g_android_defconfig
5. Open a terminal window in the kernel directory and paste the following commands:
Code:
export CROSS_COMPILE=~/arm-eabi/bin/arm-eabi-
## You can make changes directly to the tenderloin_android_defconfig using a text editor if you know what you are doing or use the on screen menu.
## replace the configuration file for your model at the end.
Code:
./make_defconfig.sh tenderloin_android_defconfig
Now you have the Linux/arm 3.4.113 Kernel Configuration screen to make all your choices.
If the menu does not comes up is due to packages you need to install on your OS for ncurses to work, first mentioned.
There is too much information to go over and explain, you will have to learn as you go, not all settings apply to the device. There are options and modules for many kernels not only just the TP.
When you are done, or feel that you have done anything after looking at the DNA of an Android kernel for the TP then press:
the esc key twice to exit and save the new changes to the configuration file.
6. Ready to make the configuration active to recompile:
Code:
make ARCH=arm tenderloin_android_defconfig
7. Start the recompile process:
Code:
make ARCH=arm -j4 CROSS_COMPILE=~/arm-eabi/bin/arm-eabi- kernel.uImage
Once is finish your new kernel uImage will be at:
kernel/arch/arm/boot/kernel.uImage
8. Copy the kernel.uImage file to your desktop or any other place out of the Kernel folder.
9. This command will reset ad clean all your settings from making the Kernel, so that you can start the process again.
Code:
make mrproper
Now you have a modified kernel and need to combine it with the ramdisk from the same ROM kernel (boot.img) that is in the ROM zip file.
Extract the boot.img from the ROM and follow the steps on how to unpack the boot.img using this link:
Now that you have access to the ramdisk, you can make system read and write and many more options on every file!
With the Kernel settings and Ramdisk you have completely total control, is the DNA settings of the device.
https://forum.xda-developers.com/hp-touchpad/development/make-root-permanet-read-write-to-t3846567
Once unpack rename kernel.uImage to kernel.uImage_original (or delete it)
Copy the new kernel.uImage to the folder and repack.
You now have your own modified kernel and can place it in the boot directory of your tablet.
If it finished booting to Android, all is good! if not start again.
Your HP Touchpad will not get bricked by any modification you will make to the kernel. It can freeze and you can do a hard reset and boot from the original kernel.
Now if you encounter a problem with your ROM, feel is slow or any other issues you know how to fix it yourself and learn how time consuming and fun is to get this working. Be part of the community and at least try to improve on the great work that others have done.
Many thanks to everyone that made all this work possible all credits go to:
Milaq, Jcsullins, Invisiblek, Flintman, Shumash and the many others! the list is longer than all the settings of the kernel!
All that explanation to run the following commands:
Code:
export CROSS_COMPILE=~/arm-eabi/bin/arm-eabi-
./make_defconfig.sh tenderloin_android_defconfig
make ARCH=arm tenderloin_android_defconfig
make ARCH=arm -j4 CROSS_COMPILE=~/arm-eabi/bin/arm-eabi- kernel.uImage
make mrproper

Categories

Resources