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!
Related
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
After the Release of ICS for our phones i decided to try building MIUI for our phones
I was able to make a zip but still havent got a booting ROM
Here I Hope to bring out developers to try and help out in developing an MIUI ROM Based on Stock the Procedure is pretty Simple
This also might Help understand what this Project is about
MIcode-Patchrom
To get started with MiCode/patchrom, you'll need to get
familiar with [Git and Repo](http://source.android.com/download/using-repo).
To initialize your local repository using the patchrom trees, use a command like this:
mkdir patchrom
cd patchrom
repo init -u git://github.com/MiCode/patchrom.git -b ics
Then to sync up:
repo sync
once there
We start off like this
STEP 1: Extracting the tools
I've extracted the tools to ~/patchrom, but you can use another directory if you want. I'll call that folder the PatchROM root folder.
STEP 2: Choosing the ROM
The PatchROM docs recommend that we use a stock ICS ROM from the device manufacturer.
So i've taken thebrainfaka's beta build and used it as my Base ROM.
U could follow the same steps
EDIT:
Although i Decided to turn things around after alotta failures so now if ur on the stock rom just type in
Code:
../build/envsetup.sh
when u are in the folder ST25i
then
Code:
../tools/releasetools/ota_target_from_phone -r
STEP 3: Creating the file structure
To port, we need to create a folder inside the PatchROM root directory for our device. I created a folder called 'ST25i' and made a makefile file
You also need to decompile the following APK files and put the resulting folder on the 'ST25i' folder:
/system/framework/android.policy.jar
/system/framework/framework.jar
/system/framework/framework-res.apk
/system/app/SystemUI.apk
/system/framework/services.jar
and the apps defined on the 'local-modified-apps' below
STEP 4: Editing the Makefile
The makefile i made has the following structure:
Code:
#
# Makefile for ST25i
#
# The original zip file, MUST be specified by each product
local-zip-file := ST25i.zip
# The output zip file of MIUI rom, the default is porting_miui.zip if not specified
local-out-zip-file := MIUI_ST25i.zip
# All apps from original ZIP, but has smali files chanded
local-modified-apps := CustomizedSettings MediaProvider
local-modified-jars :=
local-miui-modified-apps := MiuiHome Mms Settings Phone ThemeManager MiuiGallery Music
local-miui-removed-apps := MediaProvider
# All apps need to be removed from original ZIP file
include phoneapps.mk
# To include the local targets before and after zip the final ZIP file,
# and the local-targets should:
# (1) be defined after including porting.mk if using any global variable(see porting.mk)
# (2) the name should be leaded with local- to prevent any conflict with global targets
local-pre-zip := local-zip-misc
local-after-zip:= local-test
# The local targets after the zip file is generated, could include 'zip2sd' to
# deliver the zip file to phone, or to customize other actions
include $(PORT_BUILD)/porting.mk
# To define any local-target
local-zip-misc:
@echo Replace build.prop
cp other/build-ST25i.prop $(ZIP_DIR)/system/build.prop
rm $(ZIP_DIR)/system/vendor/overlay -rf
rm $(ZIP_DIR)/system/etc/customization/content/com/sonyericsson/wallpaperpicker/wallpapers -rf
local-test:
echo "an example action"
Code:
local-phone-apps = AccessoryKeyDispatcher \
AdobeFlashPlayer \
ApplicationsProvider \
AudioEffectService \
Bluetooth \
bootinfo \
CameraExtensionPermission \
CdfInfoAccessor \
CertInstaller \
CredentialManagerService \
DefaultCapabilities \
DefaultContainerService \
enhancedusbux \
ES_File_Explorer \
FaceLock \
GenericApplicationInstaller \
Initial-boot-setup \
livewallpaperearth \
InfiniteView \
MediaProvider \
MemcardTransportService \
Nfc \
PackageInstaller \
qcsemcservice \
Radio3 \
SemcCamera3D \
QuickPanelSettings \
SecWallpaperChooser \
SemcAlbum \
SemcAutoPowerOff \
SemcCameraUI \
SemcClock \
ServiceMenu \
SoundEnhancement \
usb-mtp-backup-transport \
usb-mtp-marlin-wrapper \
usb-mtp-update-wrapper \
usb-mtp-vendor-extension-service \
usbotg \
UsbTransportService \
UserDictionaryProvider \
UxpNxtLockScreen \
WapiCustomization \
WapPush \
WeatherWidget \
Youtube
Now Phoneapps.mk which i included in the makefile refers to all phone apps that i dont require
I'm still not sure regarding this but this what i made it so far
STEP 5: Apply MIUI Changes
To apply the MIUI changes on the choosen ROM, type those commands in the root of PatchROM:
Code:
source build/envsetup.sh
cd ST25i # CHANGE THIS LINE TO MATCH THE FOLDER YOU CREATED IN STEP 3
make
Now it should decompile the ROM and merge the ROM's smali files with the MIUI files, and create an ZIP file with the MIUI rom.
Github Sources for Xperia U build directory
Here!
These files should be in the folder u named as ST25i
u may use "git clone " and get all the files into ur local directory "ST25i"
Please Note in my github i've provided Files SPECIFICALLY FOR XPERIA U
Following everthing U've done so far
Now u maybe able to make ur build
while in the "patchrom" directory type in
Code:
$source ./build/envsetup.sh
$cd ST25i
$make
then go to folder/view options and check "show hidden files"
Now u will see a folder named ".build"
Enter that folder u will find a zip named MIUI_ST25i.zip
Which is Your MIUI ROM
So far I havent had success in getting it to boot,
So a humble request to All Devs to help out with this
Thanks for support Xperia U
Regards.
Hi Friends,
Just stumbled upon this thread while I was searching for something else. I recently managed to successfully port MIUI patchrom for my device Samsung Galaxy R running ICS 4.0.4.
The patchrom is for ICS 4.0.1 - 4.0.3, so if you running 4.0.4, it will be a little tougher.
But seeing the OP, I see you got something missing after build/envsetup.sh you need to run "make firstpatch" for the first time. That patches your framework, services and policy to work with MIUI. Then you'll get a hell lot of reject smali code files that you need to fix by hand. Then when you "make fullota" or "make zipfile" it will work. You may also need to patch your kernel init script in case your framework is too large for apktool to build and needs to be divided into two, like in our case.
I hope this helps. I was quoting the standard MiCode patchrom way of porting new devices. Please ignore if you are following some other setup.
parajsinghal said:
Hi Friends,
Just stumbled upon this thread while I was searching for something else. I recently managed to successfully port MIUI patchrom for my device Samsung Galaxy R running ICS 4.0.4.
The patchrom is for ICS 4.0.1 - 4.0.3, so if you running 4.0.4, it will be a little tougher.
But seeing the OP, I see you got something missing after build/envsetup.sh you need to run "make firstpatch" for the first time. That patches your framework, services and policy to work with MIUI. Then you'll get a hell lot of reject smali code files that you need to fix by hand. Then when you "make fullota" or "make zipfile" it will work. You may also need to patch your kernel init script in case your framework is too large for apktool to build and needs to be divided into two, like in our case.
I hope this helps. I was quoting the standard MiCode patchrom way of porting new devices. Please ignore if you are following some other setup.
Click to expand...
Click to collapse
Ah i'm following a different setup mate,for me the first problem to be tackled is compiling framework-res.apk,i
Even without changes I'm able to recompile but the darn thing wont work,
I have reports of similair errors in compiling framework-res
Once i get that sorted out i should be able to move forward...
oh and i already have compiled framework,services and policy with miui changes btw,
I'm pretty sure its the framework-res.apk which is giving me errors,
Some dudes in Sola also reported the same...
Hopefully when i figure out why my compiled framework doesnt boot i should get stuff moving..
bharat_goku said:
Ah i'm following a different setup mate,for me the first problem to be tackled is compiling framework-res.apk,i
Even without changes I'm able to recompile but the darn thing wont work,
I have reports of similair errors in compiling framework-res
Once i get that sorted out i should be able to move forward...
oh and i already have compiled framework,services and policy with miui changes btw,
I'm pretty sure its the framework-res.apk which is giving me errors,
Some dudes in Sola also reported the same...
Hopefully when i figure out why my compiled framework doesnt boot i should get stuff moving..
Click to expand...
Click to collapse
Why are you completetly compiling and not only drag/drop modified files using 7zip. Or did i understand something wrong.....
thebrainkafka said:
Why are you completetly compiling and not only drag/drop modified files using 7zip. Or did i understand something wrong.....
Click to expand...
Click to collapse
I have smali files too which can't be added by 7zip
Sent from my ST25i using xda premium
Ok now i decided to restart the building procedure all over again,
Too many errors in my build log so gimme a little while before i update my github sources...
To make MIUI working you must edit ramdisk in kernel.
I installed ubuntu 12.10 as my only OS now my question is can I use Flashtools? following various guides I found a wild where he said that Flashtools of ubuntu did not work for flashing the kernel, and if so do I have to install windows?
I downloaded Flashtools for ubuntu I extracted the folder but I can not start the program can anyone tell me how to do?
when i try to open flashtools answer me thisView attachment 1504335
I do run but nothing happens
Flashtool works just fine with any linux distro, so does fastboot which u can use to flash kernel.
I'm using debian unstable and both working great.
Anyway u should atleast explain what does the error in screenshot mean, in english.
ubuntu asks me how to open the file asks me if I run it in terminal or run normally, but nothing happens in any of the ways
try run it directly in terminal. by the screenshot it should be
Code:
cd ~/FlashTool
./FlashTool
I think the problem is java....View attachment 1504353
you need to take it from oracle.com and install it for your distro.
it should set your java_home by default and if not put it into ~./bashrc
exactly. its java. flashtool needs java installed, either oracle jdk or openjdk.
with regard to the recognition of the device in fastboot I need the drivers? for ubuntu I do not know where to get the driver for my xperia active
no. u dont need driver whatsoever for linux. just need adb and fastboot to set up correctly.
u should install android sdk, it'll pull adb and fastboot too.
then just add path to adb and fastboot into your bashrc, add semc usb device id in udev rules, reboot once and u good to go.
still nothing I'm doing something wrong but I do not understand what
[email protected]:~$ cd ~/FlashTool
[email protected]:~/FlashTool$ ./FlashTool
Not running as root but Sony/SonyEriccson Vendor ID found on your udev rules
if Flashing didn't work well, run flashtool as root
No Java in specified path in JAVA_HOME=/usr/lib/jvm/java
Set the variable to a valid Java installation
[email protected]:~/FlashTool$
did u install java?
try installing openjdk. its in official ubuntu repo. oracle java is unsupported anymore.
btw u should logout and relogin back after installing openjk for its path in bashrc to be effective.
jfox22 said:
still nothing I'm doing something wrong but I do not understand what
[email protected]:~$ cd ~/FlashTool
[email protected]:~/FlashTool$ ./FlashTool
Not running as root but Sony/SonyEriccson Vendor ID found on your udev rules
if Flashing didn't work well, run flashtool as root
No Java in specified path in JAVA_HOME=/usr/lib/jvm/java
Set the variable to a valid Java installation
[email protected]:~/FlashTool$
Click to expand...
Click to collapse
Is java installed in "/usr/lib/jvm" ? If yes, then add the path variable /usr/lib/jvm/bin to your bash profile.
flashtool is searching for binary program named "java" in your operating system's path (ubuntu in your case) so you have to edit the path variable in your bash profile or what ever command line interpreter you use to direct it to the "java" binary . Normally java binary and it's associated binaries are present in the bin directory inside your java installation directory so you have to add the path variable which directs the interpreter to look for binaries inside the java's bin directory where java's binaries are present.
Sent from my ST15i using xda app-developers app
I installed openjdk View attachment 1504457
but I have always this View attachment 1504458
Open your home directory and press ctrl+h to see hidden files . Can you see files called .profile and/or .bash_login or files which start with" .bash" ? Tell me what files are present.
Sent from my ST15i using xda app-developers app
what is wrong with the error is that it cant find any java installed in your path.
openjdk should be added to your path automatically if u installed it via apt-get, aptitude or synaptic. and again, after installing openjdk u need to logout and relogin for java path in bashrc to be effective. if still doesn't work even after relogin then try rebooting.
my bet is u doesn't even do the logout and relogin, that why flashtool whines about cannot find java path.
gouthamthemostwanted said:
Open your home directory and press ctrl+h to see hidden files . Can you see files called .profile and/or .bash_login or files which start with" .bash" ? Tell me what files are present.
Sent from my ST15i using xda app-developers app
Click to expand...
Click to collapse
View attachment 1504473
an0nym0us_ said:
what is wrong with the error is that it cant find any java installed in your path.
openjdk should be added to your path automatically if u installed it via apt-get, aptitude or synaptic. and again, after installing openjdk u need to logout and relogin for java path in bashrc to be effective. if still doesn't work even after relogin then try rebooting.
my bet is u doesn't even do the logout and relogin, that why flashtool whines about cannot find java path.
Click to expand...
Click to collapse
I also tried to reboot but nothing.
an0nym0us_ said:
my bet is u doesn't even do the logout and relogin, that why flashtool whines about cannot find java path.
Click to expand...
Click to collapse
That might be the problem but I've edited the path side by side and accessed binaries from terminal (which were not accessible before editing the path) without reboot or relogin.
Sent from my ST15i using xda app-developers app
---------- Post added at 03:21 PM ---------- Previous post was at 03:18 PM ----------
jfox22 said:
View attachment 1504473
Click to expand...
Click to collapse
Open .profile and read the first few lines. Does it say anything about "this profile will not be effective if .bash_login or .bashrc is present" or something like that?
Sent from my ST15i using xda app-developers app
run these in terminal and paste the output here
Code:
sudo update-alternatives --config java
Code:
sudo update-alternatives --config javac
Code:
sudo update-alternatives --config javaw
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
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
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