Help with error - Android Q&A, Help & Troubleshooting

Hi everyone,
I have started developing my own MIUI ROM with patchrom. Everything went OK, but when I execute the make workspace function, an error message appears and Google doesn't help me with it.
It seems like it's trying to unzip a file that doesn't exists in the stockrom.zip file. I think that I have to modify a file, but I don't find which one it is.
Does anyone have an idea?
This is a fragment from console:
Code:
[email protected]:~/MiCode/patchrom/m7ul$ make workspace
>>> Install framework resources for apktool...
install framework-miui-res.apk
/home/jose/MiCode/patchrom/tools/apktool --quiet if /home/jose/MiCode/patchrom/miui/XHDPI/system/framework/framework-miui-res.apk
/home/jose/MiCode/patchrom/tools/apktool --quiet if /home/jose/MiCode/patchrom/miui/XHDPI/system/framework/framework-res.apk miui
unzip >/dev/null stockrom.zip "system/framework/*.apk" -d out
install out/system/framework/framework-res.apk
<<< install framework resources completed!
unzip >/dev/null stockrom.zip system/framework/services.jar -d out
/home/jose/MiCode/patchrom/tools/apktool --quiet d -f out/system/framework/services.jar services.jar.out
unzip >/dev/null stockrom.zip system/framework/android.policy.jar -d out
/home/jose/MiCode/patchrom/tools/apktool --quiet d -f out/system/framework/android.policy.jar android.policy.jar.out
unzip >/dev/null stockrom.zip system/framework/framework.jar -d out
/home/jose/MiCode/patchrom/tools/apktool --quiet d -f out/system/framework/framework.jar framework.jar.out
unzip >/dev/null stockrom.zip system/framework/framework2.jar -d out
caution: filename not matched: system/framework/framework2.jar
make: *** [framework2.jar.out] Error 11
¡Thanx a lot!

Been trying to get PatchRom to work myself. What a nightmare. I asked over on the offical miui forums and got this reply. My question is first followed by the reply. Perhaps you can make sense of it.
my question:
Thank you very much for this guide! I am not even close to a developer but with much luck I hope to port the latest MIUI to the Samsung Skyrocket, SGH-i727.
If I want to use CM 10.2 as a BASE ROM, can I still use the CM 10.1 Template?
Running Make Workspace gave me an Error 11 for Framework_Ext which is not found and I am unsure where that file should come from. Base ROM? Or take it from a current MIUI ROM?
reply:
You can only use 4.0.4 - 4.2.2 as a MIUI base, it doesn't support 10.2 yet
A lot of the time you can find a pre-existing CM10.1 base for a port that has proper frameworks you can use for Patch, there are a few roads to take when porting this rom and you do not have to use patch to do it.
If you can find a MIUI base that will boot on your phone but the resolution is messed up you can use patch sources to fix the resolution; the internal code doesn't change a lot in between versions just the APK code which is called via generic injector flags

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!

[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

[DEV][WIP][ICS][GUIDE]Patchrom method to build MIUI from Source

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.

[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...

Building MIUI for Nexus 6p

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

Categories

Resources