MiPatcher: A MIUI forking utility - Android Software Development

No more free rides

Donor is Port Rom?

Black_Eyes said:
Donor is Port Rom?
Click to expand...
Click to collapse
Yes

Tqr said:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Introduction
Runs on Windows & Linux with WINE
MiPatcher is designed to append MIUI to any CM base that shares the same 'Build.id'. This can be found in build.prop.
At the same time this will also serve as a technical guide for folks just starting out with porting MIUI in the 4.4 era, those doing this by hand or others who are just returning to the game.
MiPatcher is not a substitute for PatchROM and is not the same in function by any means although it can use Patch components on the most basic level.
This is geared more toward people who are trying to build a functional MIUI for neglected devices and also for people testing various bases who may not yet be configured to build from source to accommodate some of MIUIs functionality.
MiPatcher is as of right now very straight-forward; you pick the resolution for the device you are porting for and it will adjust the Donor MIUI to 'look right' on your device.
Requirements
- Autohotkey (Only if you intend to run the source for this)
- CyanogenMod 11
*Disabled SELinux
*Boot.img edits (for full functionality if not using PatchROM)
*Modified seapp_contexts (At Kernel level for use with PatchROM, at source level for manual porting/using this tool)
**Stock CM with init.d support may also be used; although it will be sloppy.
- MIUI donor firmware with the same 'Build.id' found in /system/build.prop
- PatchROM resources (If your Donor is a different resolution, you do not 'need' them unless things look terrible)
*Or get PatchROM resources here if you intend to grab for every resolution; it's half the size of the one on Github better compression
- WinRAR or 7zip
Features
- Automatically append MIUI to any same code-base firmware.
- Append init.d on supported devices to force boot without changes to the kernel
Prep-work
Only three files must be edited for test-ports, which I'll cover now.
Framework-res.apk
Open your Base and donor Framework-res.apk, navigate to res/xml and import the following XMLs:
Code:
Storage List
Power Profile
Build.prop
Code:
ro.build.version.incremental=x.xx.xx
persist.sys.root_access=0
ro.config.notification_sound=xxx.ogg
ro.config.alarm_alert=xxx.ogg
ro.config.ringtone=xxx.ogg
ro.skia.use_data_fonts=1
ro.miui.ui.version.code=3
ro.miui.ui.version.name=V5
qemu.hw.mainkeys=0 **[U] If you have no physical HW keys.[/U]
Updater-Script
Code:
set_perm(0, 0, 06755, "/system/xbin/lbesec"); ***If LBEsec exists in your donor
set_perm(0, 1000, 06750, "/system/xbin/shelld");
set_perm(0, 0, 06755, "/system/xbin/su");
With these most basic edits, MIUI will boot but with the need to install MIUI Lite to fix themes partially; as native ThemeManager, updater and backup will FC continuously.
Planning to use PatchROM? If you have an unlocked BL device or a device that will accept an unsigned kernel you can split your boot.img's ramdisk and add the following entries to 'seapp_contexts' immediately under user=shell, like this :
user=shell domain=shell type=shell_data_file
Code:
user=theme seinfo=platform domain=platform_app type=platform_app_data_file
user=backup seinfo=platform domain=platform_app type=platform_app_data_file
user=updater seinfo=platform domain=platform_app type=platform_app_data_file
And above anything else that may follow user=shell.
If you are not planning on using PatchROM, you will have to disable SELinux fully and edit your 'seapp_contexts' in source. In CyanogenMod11 source it is located in the following directory:
Code:
external/sepolicy/seapp_contexts
Now it's time to kill SELinux, navigate to your Kernels config folder in source; generally found at:
Code:
kernel/brand name/kernelname-common/arch/arm/configs
and find 'kernelname_defconfig' or 'kernelname_selinux_defconfig', change the following value to 'n':
Code:
CONFIG_SECURITY_SELINUX=[B]n[/B]
This will yield a functional CyanogenMod11 that can be used with PatchROM without issue, and can also be used to just fork firmware which is useful in the case of unified device builds, which Patch does not really like so much.
Now that you've built your base the following edits must be made to the kernel's Ramdisk:
Init.rc
Add this line at the very end of init.rc
Code:
import /init.miui.rc
init.miui.rc
Create this file in the root of your ramdisk and place the following inside:
Code:
#service for shelld
service shelld /system/xbin/shelld
class main
#service for su
service su_daemon /system/xbin/su --daemon
class main
oneshot
service lbesec /system/xbin/lbesec
class main
oneshot
init.superuser.rc
Code:
Delete this file
init.cm.rc
Add a '#' to the following line to disable the calling of init.superuser.rc
Code:
[B]#[/B]import /init.superuser.rc
Default.prop
Change the following values:
Code:
ro.adb.secure=[B]0[/B]
ro.secure=[B]0[/B]
ro.allow.mock.location=[B]1[/B]
Once these edits have been made your base can now be adapted to MIUI.
MiPatcher Instructions
1. Extract the contents of baserom.zip to 'base'
2. Extract the contents of miuidonor.zip to 'donor'
3. Inside of the PatchROM resources zip, extract 'HDPI' 'xHDPI' and 'xxHDPI' into the 'PatchROM' folder
4. Run MiPatcher, select your resolution and if you haven't made any kernel editing or done special source building, use soft-mods.
5. Zip the contents of 'Base' and flash it.
6. If this yields a non-booting build your codebase is too distant from your donor, find another same Build.ID release and try again if not proficient with ADB.
Current version:0.01
0.01: First release, Basic functionality and enough to produce one-shot ports when the base is properly prepared.
0.01: x64 x86 stand-alone .exe
Next Version:0.02
0.02: Clean up redundant/inefficient code.
0.02: Add options for boot.img, build.prop, meta-inf backup and loading.
*to avoid having to edit or manually move these with each attempt on base.
Download
9/28/2014: MiPatcher x86&x64
This is stand-alone and requires nothing to run, PatchROM parts are optional but suggested nonetheless.
Source
To use this source as an executable 'program' you must download and install Autohotkey, after right-click on your desktop to create a new '.ahk' file, paste the contents of this inside of it and save.
Create the following folders in the same folder as your .ahk file, the folder structure should mimic the following in terms of layout with extracting things:
-base
*META-INF
*System
*Boot.img
-donor
*META-INF
*System
*Boot.img
-mod create two notepad++ files with no extension, name them the following and place the respective content inside:
*00lbesec
Code:
#!/system/bin/sh
/system/xbin/lbesec &
*00shelld
Code:
#!/system/bin/sh
/system/xbin/shelld &
-patchrom
*HDPI
*xHDPI
*xxHDPI
AHK source:
http://paste.ee/p/balNM
FAQ
Q: My ROM isn't booting!
A: Try another MIUI that uses the same Build ID as yours, or use ADB to debug your build as it will be really close either way.
Q: Is there any difference between using a .ahk file and a .exe?
A: Yes. It's easier to update by pasting new code into a .ahk text file than to download packed .exe files in the longrun; however when using a .exe you don't need to install Autohotkey.
I will make standalone .exe for this at some point soon today.
Q: Theme/Updater/Backup is FCing!
A: It's a SELinux related error, sounds like you may be using PatchROM or a unified build; in this case build from source with the Seapp_context, and with SELinux turned off.
Q: Storage isn't mounting!/File Explorer is closing!
A: Import CyanogenMod11's 'StorageList' located in Framework-res.apk/res/xml into MIUI's along with the 'PowerProfile' to resolve unreadable storage
Q: [Insert name] App is crashing...
A: Debug using ADB or find another donor if you're feeling lazy, most of the time this yields perfect results but some things will maybe need a little polish depending on how far the codebase from the Donor and your Base firmware are.
Big TY to:
Code:
* Sijav
* Chevelle
* Yun
* All the Russian firmware developers, ahead of everyone else by a bit..
XDA:DevDB Information
MiPatcher: A MIUI forking utility, Tool/Utility for all devices (see above for details)
Contributors
Tqr
Version Information
Status: Testing
Stable Release Date: 2014-10-04
Beta Release Date: 2014-09-30
Created 2014-09-28
Last Updated 2014-09-28
Click to expand...
Click to collapse
What's the "MIUI donor firmware" ? Doest it work on Ubuntu with Wine ?

h2o64 said:
What's the "MIUI donor firmware" ? Doest it work on Ubuntu with Wine ?
Click to expand...
Click to collapse
Any MIUI firmware as long as it has the same build.id as your base
Edit: Yes this tool works in ubuntu with WINE, but only as a .exe, it can't run as a .ahk file I believe.. I mean I've never tried running raw .ahk files in Linux

Tqr said:
Any MIUI firmware as long as it has the same build.id as your base
Edit: Yes this tool works in ubuntu with WINE, but only as a .exe, it can't run as a .ahk file I believe.. I mean I've never tried running raw .ahk files in Linux
Click to expand...
Click to collapse
Okok.. I'll use CM 11 of my Moto G with the Nexus 5 build.
Can I post here if I've trouble with the software?

h2o64 said:
Okok.. I'll use CM 11 of my Moto G with the Nexus 5 build.
Can I post here if I've trouble with the software?
Click to expand...
Click to collapse
Sure, I don't mind Q&A

h2o64 said:
Okok.. I'll use CM 11 of my Moto G with the Nexus 5 build.
Can I post here if I've trouble with the software?
Click to expand...
Click to collapse
Nexus 5 won't be Good
what about a little wait and We will Port from Moto x ? @h2o64

Black_Eyes said:
Nexus 5 won't be Good
what about a little wait and We will Port from Moto x ? @h2o64
Click to expand...
Click to collapse
I'll try from one plus one (4.4.4)
If we need to wait. I prefer waiting for Redmi 1S which have a configuration very near to Moto G's one.
---------- Post added at 04:53 PM ---------- Previous post was at 04:22 PM ----------
Tqr said:
Sure, I don't mind Q&A
Click to expand...
Click to collapse
Works perfectly fine on Ubuntu 14.04 64 bits (I've used x64 one).
I'll flash the zip file. Keep you updated.

Black_Eyes said:
Nexus 5 won't be Good
what about a little wait and We will Port from Moto x ? @h2o64
Click to expand...
Click to collapse
I just made a post for the Moto X, sorry about that lol

Tqr said:
I just made a post for the Moto X, sorry about that lol
Click to expand...
Click to collapse
Which base did You use?
Help us to Boot it on Moto g

Black_Eyes said:
Which base did You use?
Help us to Boot it on Moto g
Click to expand...
Click to collapse
ok, I'll have to build you guys CyanogenMod from my code-base.. give me a few hours and I'll get it built by the end of today
Edit: I'm going to automate this in a very strong way; by the time this tool reaches 'stable' I will have ideally automated everything so that people with a totally unsupported device can have everything done for them from building to having MIUI applied without having to manually do anything.
It will not be as recent as a PatchROM build but it will be a 'sure bet' for anyone looking to use a pretty recent internal version of MIUI; I'm not trying to make a platform to replace PatchROM It's essential but I am trying to make a platform to enable people to just use MIUI without having to pull teeth over it

Tqr said:
ok, I'll have to build you guys CyanogenMod from my code-base.. give me a few hours and I'll get it built by the end of today
Click to expand...
Click to collapse
Ok Thanks i will be waiting
---------- Post added at 08:06 PM ---------- Previous post was at 08:02 PM ----------
Tqr said:
ok, I'll have to build you guys CyanogenMod from my code-base.. give me a few hours and I'll get it built by the end of today
Edit: I'm going to automate this in a very strong way; by the time this tool reaches 'stable' I will have ideally automated everything so that people with a totally unsupported device can have everything done for them from building to having MIUI applied without having to manually do anything.
It will not be as recent as a PatchROM build but it will be a 'sure bet' for anyone looking to use a pretty recent internal version of MIUI; I'm not trying to make a platform to replace PatchROM It's essential but I am trying to make a platform to enable people to just use MIUI without having to pull teeth over it
Click to expand...
Click to collapse
That will be Great :good:

Tqr said:
ok, I'll have to build you guys CyanogenMod from my code-base.. give me a few hours and I'll get it built by the end of today
Edit: I'm going to automate this in a very strong way; by the time this tool reaches 'stable' I will have ideally automated everything so that people with a totally unsupported device can have everything done for them from building to having MIUI applied without having to manually do anything.
It will not be as recent as a PatchROM build but it will be a 'sure bet' for anyone looking to use a pretty recent internal version of MIUI; I'm not trying to make a platform to replace PatchROM It's essential but I am trying to make a platform to enable people to just use MIUI without having to pull teeth over it
Click to expand...
Click to collapse
Amazing ...
Is the source code available ?
@Tqr the tutorial stays a bit un-clear :
Why using patchrom after porting ? Can we use it during porting ?
All the stuff about patchROM is a bit complicated.
We need to re-build an entire CM11 without Selinux ?

h2o64 said:
Amazing ...
Is the source code available ?
@Tqr the tutorial stays a bit un-clear :
Why using patchrom after porting ? Can we use it during porting ?
All the stuff about patchROM is a bit complicated.
We need to re-build an entire CM11 without Selinux ?
Click to expand...
Click to collapse
He will Build for Us

Black_Eyes said:
He will Build for Us
Click to expand...
Click to collapse
I'm a dev. I want to try it myself and to learn how to do.
I've work a lot on it :'( :'( :'(

h2o64 said:
Amazing ...
Is the source code available ?
@Tqr the tutorial stays a bit un-clear :
Why using patchrom after porting ? Can we use it during porting ?
All the stuff about patchROM is a bit complicated.
We need to re-build an entire CM11 without Selinux ?
Click to expand...
Click to collapse
When using PatchROM you can leave SELinux intact, when porting manually/using this tool you must fully disable SELinux or use a base that does not have it to begin with.
You don't even need to touch PatchROM to use this, or Linux honestly.. even the PatchROM Resources aren't required unless you're coming from a device with a different resolution sometimes.. but not always
Edit: Otherwise make the following edits I've outlined to CyanogenMod in source, I feel I was pretty clear on what to change

Tqr said:
When using PatchROM you can leave SELinux intact, when porting manually/using this tool you must fully disable SELinux or use a base that does not have it to begin with.
You don't even need to touch PatchROM to use this, or Linux honestly.. even the PatchROM Resources aren't required unless you're coming from a device with a different resolution sometimes.. but not always
Edit: Otherwise make the following edits I've outlined to CyanogenMod in source, I feel I was pretty clear on what to change
Click to expand...
Click to collapse
You just have to say the two first line of this post because they are perfectly understable and help me a lot .
Can I just re-built the kernel without Selinux ?

h2o64 said:
You just have to say the two first line of this post because they are perfectly understable and help me a lot .
Can I just re-built the kernel without Selinux ?
Click to expand...
Click to collapse
@h2o64 Yes
and i think that's why Rom doesn't boot with manually Porting
---------- Post added at 08:37 PM ---------- Previous post was at 08:33 PM ----------
How can i disable SELinux without Building the Kernel ?

h2o64 said:
You just have to say the two first line of this post because they are perfectly understable and help me a lot .
Can I just re-built the kernel without Selinux ?
Click to expand...
Click to collapse
No; you will still have Fingerprint errors

Related

[GUIDE]How to port manufacturer ROM (Sense/Touchwizz...) [UPDATED For KITKAT]

How to port manufacturer ROM​​
As many people ask me how i’m porting ROMs to my Nexus S i share my method in this thread.
This method works for the Nexus but should also work on a lot of devices. The list of files that I would write in this thread is not exhaustive.
Please for all improvements, send me a MP. I’m french and it’s possible for me to misspellings
This thread is in constant progress thanks to your feedback.
Do not use this guide to port rom based on CM / AOSP roms. Please use this guide to port Sense / TouchWizz / Motoblur etc ... If you want to port based on AOSP roms there are others guide on XDA.
This method is not perfect, much work will then be necessary to fix all the bugs, and nothing says that this method is functional rather than every time ....​
I. What you need
Ubuntu and dsixda's Android Kitchen. Please refer to this link
Notepad++
Winrar
A brain =)
NB : Before you start porting a ROM you need to know several things. Over the phone you want to port the rom will have a hardware close to your, more porting will be simple and functional.
Example : Same screen resolution, processor of the same type (ARM6, ARM7, etc ....)
PORT is the ROM you want to port and BASE is the ROM developed for your device (AOSP/CM)
II. Let’s go !
1. Create new folder where you want and name it « Rom_port_for_yourdevice »
2. Download AOSP/CM developed for you device with the same android version which the rom you want to port
3. Download the rom you want to PORT
4. Extract each zip ROM in separate folder in « Rom_port_for_yourdevice »
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
5. Now it will appears two folders. Open both.
In PORT folder delete META-INF folder and copy/paste the META-INF folder of BASE in PORT folder.
6. Open system folder in PORT rom and delete vendor folder
7. Now in PORT folder open lib folder and delete these folders :
modules
hw
egl
8. Now go in BASE folder and select (if exists) these folders :
addon.d
bin
etc
customize
framework
lib
vendor
xbin
Now copy these in system folder of PORT but do not replace anything ! (If forgot « ETC » folder on screenshot)
 
9. Open bin folder in BASE and PORT folders. Copy and replace these files from BASE to PORT :
adb
brcm_patchram_plus
hostap
hostapd
init.vsnet
linker
logcat
logwrapper
radiooptions
rild
rmt_storage
vold
wpa_cli
wpa_supplicant
glgps
10. Now in BASE and PORT system folder open etc folder and copy and replace (if exist) these files/folders from BASE to PORT :
Bluetooth
Dhcpcd
Firmware
gps
init.d
permissions
ppp
pppd
security
ssh
terminfo
updatecmds
wifi
audio_effects.conf
audio_policy.conf
dbus.conf
gps.conf
init.*.sh
media_codecs.xml
media_profiles.xml
nfcee_access.xml
secomxregistry
vold.conf
vold.fstab
wrs_omxil_components.list
11. Now copy usr folder from BASE to PORT and replaces all files
12. Open lib folder in BASE and PORT folders. Copy and replace these files from BASE to PORT :
liblog.so
libsecril-client
libreference-ril.so
libril.so
libs3cjpeg.so
libaudioflinger.so (if port does not boot, use from PORT rom)
libaudioutils.so
libtinyalsa.so
libpn544_fw.so
libSEC_OMX_Core.so
libOMX.SEC.***.Decoder.so
For HTC devices:
libhardware_legacy.so
libhtc_ril.so
libhtc_ril_switch.so
For LGE devices:
lge-ril.so
More commonly:
Add all the lib files with "ril" in their name
13. Open framework folder in BASE and PORT folders. In both folder rename framework-res.apk to framework-res.apk.zip and open the two files with Winrar.
In both files go to /res/xml/ and replace storage_list.xml of PORT framework-res.apk with the one of BASE.
Now close Winrar and rename framework-res.apk.zip in framework-res.apk in both folders.
14. Very important: By the way, there are some proprietary binaries missing from the guide (just depending on the device, as it's impossible to include all), so what I recommend is if your device has official cm, go to github.com/themuppets, pick the repo corresponding to your manufacturer and branch corresponding to your android version and download it and copy the files in your device's folder to the ROM you are porting. Lib to lib, bin to bin, etc. You may also need to look at the Mk files in the cm device source for your device to see what is built from source that you'll need such as libs and bins. For example, if it has Product_packages += \libwifi \
You would need to copy libwifi from cm. [/QUOTE]
Source: http://forum.xda-developers.com/showpost.php?p=41294434&postcount=23
15. Now open build.prop of PORT rom and replace these lines with BASE build.prop :
Code:
ro.product.model=
ro.product.brand=
ro.product.name=
ro.product.device=
ro.product.board=
ro.product.cpu.abi=
ro.product.cpu.abi2=
ro.product.manufacturer=
ro.wifi.channels=
ro.board.platform=
ro.build.product=
ro.build.characteristics=
rild.libpath=
rild.libargs=
wifi.interface=
16. Reboot to Ubuntu.
Steps for android 4.3 and older
Open dsixda's Android Kitchen
Decompile both boot.img/kernel
Open both init.rc files
In CM/AOSP kernel replace BOOTCLASSPATH by the one from PORT boot.img ROM
Save and recompile kernel
Use CM/AOSP modified kernel in your rom.
Steps for android 4.4 and newer
Open dsixda's Android Kitchen
Decompile both boot.img/kernel
Open both init.environ.rc files
In CM/AOSP kernel replace BOOTCLASSPATH by the one from PORT boot.img ROM
In CM/AOSP kernel do these changes:
--> ro.secure=1 to ro.secure=0
--> ro.debuggable=0 to ro.debuggable=1
--> persist.sys.usb.config=mtp to persist.sys.usb.config=mtp,adb
--> ro.adb.secure=1 to ro.adb.secure=0
Save and recompile kernel
Use CM/AOSP modified kernel in your rom.
17. Now ZIP your PORT rom folder and flash it.
Please don't forget to use LOGCAT to debug the rom..... And to thanks or/and donate to me .....
Thanks !
​GalaxyUser
Here, I give you some tips and may help you to fix issues..​
Files to fix ...
You can try to replace some of these files (if exists) to fix ...
NFC
/system/app/Nfc.apk
/system/lib/libnfc*.so
/system/bin/pcscd
Radio FM
/system/bin/fmradio
Sensors
/system/bin/akmd*
/system/lib/libsensors.so
Bluetooth
/system/bin/bd_prov
/system/bin/uim*
/system/bin/hcid
/system/bin/bluetooth*
/system/bin/hciattach
/system/bin/sdptool
/system/xbin/hciconfig
Wifi
/system/bin/netcfg
/system/bin/dhcpcd
/system/bin/ifconfig
/system/bin/hostap
/system/bin/hostapd
/system/bin/hostapd_bin
/system/bin/pcscd
/system/bin/wlan*
/system/bin/wpa*
RIL
/system/bin/stmd
/system/bin/rild*
/system/etc/rril
Camera
Copy libcamera*.so from base to port rom
If rom does not boot after that, replace file one by one and see which file is the problem.
If you port on HTC Devices, try these:​Fix Network auto select
Decompile framework-res.apk
Go to this folder \framework-res\res\values
Open bools.xml
Change <bool name="skip_restoring_network_selection">true</bool>
To Change <bool name="skip_restoring_network_selection">false</bool>
Fix graphichal issues
Decompile framework.jar
Change these files with your CM base
smali\smali\android\os
Environment
SystemProperties
smali\smali\android\view
HardwareCanvas
HardwareRenderer$Gl20Renderer
HardwareRenderer$GlRenderer
HardwareRenderer
so there is hope that i can port xperia t jb rom to galaxy s3 using cm10 rom for galaxy s3
zeyadhan said:
so there is hope that i can port xperia t jb rom to galaxy s3 using cm10 rom for galaxy s3
Click to expand...
Click to collapse
Use CM10 and not CM10.1 to have the same version.
Try it i hope it will work
thank you for reply i saw your threads you ported lot of roms do you think it will boot
but sadly i use windows 7 so there is no way to decombile the kernel
zeyadhan said:
thank you for reply i saw your threads you ported lot of roms do you think it will boot
but sadly i use windows 7 so there is no way to decombile the kernel
Click to expand...
Click to collapse
I don't know if it will boot, when i do a port i never know if it will boot ^^
Read this: http://forum.xda-developers.com/showthread.php?t=633246
You could use kitchen in windows but it's not optimal i think.
i guess that the only way is install the Ubuntu and decombile kernel and make changes then combile it and copy the kernel to phone and back to windows (need a lot of time)
rom stuck at bootanimation maybe i do something wrong
zeyadhan said:
rom stuck at bootanimation maybe i do something wrong
Click to expand...
Click to collapse
Do a logcat and post pastbin link
Sent from my XT890 using xda app-developers app
Thanks for good tip!
Dear Galaxy_User,
i just port GT-I9100 rom for Nexus S, i am on Boot Animation and nothing working after that ..
http://pastebin.com/YBWDU1L4 here is the link for logcat .. kindly help me out
Regards,
Assassinoid
assassinoid said:
Dear Galaxy_User,
i just port GT-I9100 rom for Nexus S, i am on Boot Animation and nothing working after that ..
http://pastebin.com/YBWDU1L4 here is the link for logcat .. kindly help me out
Regards,
Assassinoid
Click to expand...
Click to collapse
Hi,
Your logcat is very weird
Try libaudioflinger.so to use from PORT
looks not bad
sent from my security handy talkie
talk free , no pay®
Nothing worked .. I just quit
Sent from my Nexus S using xda premium
assassinoid said:
Nothing worked .. I just quit
Sent from my Nexus S using xda premium
Click to expand...
Click to collapse
Do you have correctly edited the kernel ?
You need to use CM kernel for Nexus S and to modify it with the BOOTCLASSPATH of Galaxy S Kernel.
Send me the boot.img of Nexus S and the boot.img of Galaxy S i will check that
GalaxyUser said:
Do you have correctly edited the kernel ?
You need to use CM kernel for Nexus S and to modify it with the BOOTCLASSPATH of Galaxy S Kernel.
Send me the boot.img of Nexus S and the boot.img of Galaxy S i will check that
Click to expand...
Click to collapse
OK I'll do that
Sent from my Nexus S using xda premium
Nice, the first actual tutorial on this instead of "just replace all apps/framework and media folder" which is a load of bull****,
Good job
Will this guide work if you want to port LG Stock ROM to another LG device? Like you ported O4X to Optimus Black.. I can use this guide to port O4X stock ROM to O2X?
Also, when porting stock ROM, I will need CM10 as base ROM or I must use same android version as the ROM I am porting?
Thanks.
natalya said:
Will this guide work if you want to port LG Stock ROM to another LG device? Like you ported O4X to Optimus Black.. I can use this guide to port O4X stock ROM to O2X?
Click to expand...
Click to collapse
I did it for Optimus Black, try it for O2X
natalya said:
Also, when porting stock ROM, I will need CM10 as base ROM or I must use same android version as the ROM I am porting?
Thanks.
Click to expand...
Click to collapse
You can use any rom with the same android version
GalaxyUser said:
I did it for Optimus Black, try it for O2X
You can use any rom with the same android version
Click to expand...
Click to collapse
Okay, can you please link me to the one you used as port (the O4X ROM) and do you recommend me to use that one as port or shall I use the one you already ported for Optimus Black as port?
PS: Is it easy to change bootclasspath?

[DEV][TEMPLATE] Kerneller - Modify Ramdisk, dt, zImage, and SELinux on the fly

༼ つ ◕_◕ ༽つIn the name of our great lord Helix!༼ つ ◕_◕ ༽つ
Kerneller, a flashable Zip template for ramdisk modifications
Google what a kerneller is​
Many of you have no doubt heard of osm0sis' Anykernel2 and previously koush's Anykernel. Kerneller is an alternative designed solely around Sony's Xperia lineup, taking into account the 'recovery-inside-ramdisk' situation we've found ourselves in. However, the script should also support other devices such as Nexus. (I say should because I can only test on the Xperia devices I own -- if anyone could help test, I would be very grateful!)
And with the release of Android 5.0 Lollipop, users have been facing a dilemma: To download a permissive or enforcing version of the kernel? Kerneller fixes that issue by combining the two in a single zip using a slightly modified version of keycheck, allowing the user to choose what will be installed at the time of flashing.
Source: https://github.com/someone755/kerneller
Any questions, tips, or comments are welcome!
Credits & Thanks: All authors of the included binaries. osm0sis for AnyKernel2 and porting the binaries. koush for the original AnyKernel concept. Everyone who helped test. Myself5 for the inspiration and oshmoun for the help.
XDA:DevDB Information
Kerneller, Tool/Utility for the OEM Cross Device Development
Contributors
someone755
Version Information
Status: Stable
Created 2015-12-26
Last Updated 2015-12-31
This is something, i was expecting.
Thank you very much.
Black_Eyes said:
This is something, i was expecting.
Thank you very much.
Click to expand...
Click to collapse
I'm glad you like it but I can't say that's the reaction I was expecting lol. Please do let me know if anything bothers you though.
Just by the way, I moved the thing into its own repo and added a small script to compress and sign it. Cheers!
work for lock or un lock?thank you
xsj said:
work for lock or un lock?thank you
Click to expand...
Click to collapse
I'm sorry to say I don't understand the question. This script cannot lock or unlock anything.
It modifies the boot sector of your device. For that to be possible in the first place, you need an unlocked bootloader.
thank you,Im lockbootloader now,and that's what I want to know
Sorry for noob question,but where to download?Cant find the link.Want to try this on my m2 aqua.
mariosenta said:
Sorry for noob question,but where to download?Cant find the link.Want to try this on my m2 aqua.
Click to expand...
Click to collapse
Your best bet would be using 'git clone', though you can also just download the whole repo as a zip file (here, if you're having trouble finding it). Note though that the packing script won't work in Windows unless you have a *nix shell emulator (such as Cygwin or win-bash)!
You can still zip the thing together yourself using 7zip or WinRAR, however it will not be a signed zip (so some recoveries -- like Cyanogen Recovery -- may refuse to flash it, but you could use the bash script to figure out what you have to do in Windows to sign your new zip).
If you do eventually get it to run, I'd be very glad if you could send me the recovery.log of the flash via PM!
TouchWiz?
This tool works on touchwiz Lollipop 5.1.1 Roms or not?
Stock kernel is Enforcing and I tried various methods to make it permissive, nothing works
Pavan l said:
This tool works on touchwiz Lollipop 5.1.1 Roms or not?
Stock kernel is Enforcing and I tried various methods to make it permissive, nothing works
Click to expand...
Click to collapse
I don't know if your device's boot image is assembled using mkbootimg (like Nexus devices). If so, you may be able to.
But you'll need to pack the device tree binary and zImage into the zip (just use unpackbootimg).
So, I'm very confused, I usually build boot.imgs right out of the AOSP source code... how could I leverage this?
HaoZeke said:
So, I'm very confused, I usually build boot.imgs right out of the AOSP source code... how could I leverage this?
Click to expand...
Click to collapse
It's not really meant for people who compile ROMs, but more for kernel devs or testers who only compile the kernel.
Instead of always having to extract the ramdisk from boot images (whenever the ramdisk changes, which we kernel people can't know and check for every single kernel, nor do we care) and then using mkbootimg (meaning you have to release one boot image for every ramdisk you need to support, i.e. if you want to support ROMs with vastly different ramdisk implementations, where mixing ramdisks would cause a bootloop).
With this, you go around the problem. Compile the kernel outside of the ROM tree (which takes a few minutes vs several hours that compiling the entire ROM can take), grab the zImage-dtb (or adjust the script to use zImage + dt.img), and package the thing together. (There are options to also include kernel modules in the zip, and scripts that will compress and sign the zip for you.)
The highlight of this project used to be being able to switch Selinux status when flashing the zip, instead of adding androidboot.selinux=permissive for each boot image, and then uploading two images. Nowadays compatibility of this switch with various devices and Android versions is questionable (I can't test personally because of how limited Xperia devices have become recently -- the 3.10 kernel does not work with enforcing selinux), but the core idea of using it to avoid having to create boot images is still alive and kicking.

[ROM][7.1.2][OFFICIAL] Team OctOS Oct-N [WEEKLIES][cancro]

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Disclaimer: OctOs is a WIP. It has been evaluated as being stable, and is suitable for daily use in most cases. While it may be considered stable, there may be unknown bugs. The development team is not responsible for any damage to your device or your information.
Click to expand...
Click to collapse
Team OctOs presents Oct-N.​
We maintain a current release record and change-log on our website: http://www.teamoctos.com
We have Gapps here.
http://opengapps.org
***USE Gapps of your choosing, we prefer Open Gapps***
- Please Do Not Mirror our files without talking to us. We can do that ourselves should we desire to. -​
Feature List
Substratum rootless theme engine support (must install Substratum from play store)
Tentacles settings!
Pixel Launcher Included
OmniSwitch
Power menu options
Screenshot
Screen record
DPI settings
Status bar time and date options
Status bar network traffic indicator
Status bar notification settings
Quick tile settings
Volume button playback control
Volume button wake
DUI (fling, pulse, smartbar)
Screen record
And much more!!!!
Click to expand...
Click to collapse
Frequently Asked Questions
Q: Is this Android 7 (Nougat)?
A: Yes, this is Android 7.1.2
Q: What code is Oct-N based on?
A: This version of Oct-N is based on LineageOS 14.1
Q: Why isn't there XYZ feature?
A: Shoot us a Suggestion if you want to see something added. While we are not going to promise to implement, we will always look into it
Q: But all the others have..
A: ROM developers, build something they want to use. The ROM developer that includes something they won't run implies less than 100% effort to ensure it does work. As a team, we have similar goals and objectives. If XYZ ROM has a feature you want, and we don't include (or don't want to include), feel free to use XYZ ROM, or build your own custom version of Oct-N.
Q: What about root?
A: Root is removed by default (user will be able to flash which ever root zip they want)
Bugs:
Bugs happen. Our testers are very good at breaking things, but no where near as good as the rest of the Android public. In order to investigate and fix issues, we need the help of the users who are going to report them. The Android OS has many nifty features to help us in this, but only if we can engage the user to assist us.
Logs, Logcat, and the Android Debugging Bridge (ADB)
Like any other OS, Android has multiple log files that are generated and record the goings-on of the system. As a user, you have two basic ways to view and pull these to send to us. Without the information in the logfiles, there simply is not a whole lot of information to go on.
Log file APKs
Team OctOs recommends SysLog from the Android Market. This application will allow you to selectively pick any (or all) of the system logs, compress them into a .ZIP file, and allow you to save, email, move to your Copy/DropBox/Cloud Storage account, etc.
ADB Logcat
The Android Debugging Bridge (ADB) is a powerful tool available from Google as part of the Android Software Development Kit (SDK). Used for many things, being able to selectively see, in real-time, what your device is doing cannot be downplayed. While there is more setup involved, if you are doing consistent ROM flashing, you really should invest the time to get setup properly to do it.
ADB Logcat tutorial here: How to create a logcat log
Basic Instructions:
Download ROM .zip file and MD5 file, and grab your favorite Open Gapps package http://opengapps.org
Reboot to Recovery (Note: Use Reboot to Recovery from Power Menu, Hardware-based boot to recovery, or adb reboot recovery - ROM Manager or similar software is NOT supported)
--- TWRP is the ONLY recovery Team OctOs uses - We do not support flashing on CWM ---
The Oct-N ROM installation script will automatically wipe /system, /cache, and /dalvik-cache. There is no need to do these before or after flashing the ROM unless you are instructed to by your Gapps Provider. When dirty flashing weekly updates, you MUST reflash Gapps along with any other files, apps, custom mods or kernels etc.. (anything that resides in system partition)
Flash ROM, GApps and any additional .ZIP files
Reboot
Download
Download from Team-OctOS web site!
Change log
View change log on Team-OctOS web site!
The foundation of the Android OS is the fact that is it open-source. We have all code we use internally in the creation of Oct-N available on our GitHub repositories.
Unless otherwise specified, all Oct-N builds kernel souce can be found on github at Team-OctOS.
Team OctOs GitHub - http://www.github.com/Team-OctOs
Team OctOs Gerrit Review - http://www.teamoctos.com:8080
Team OctOs GPLv2 License - http://www.teamoctos.com/license/
Team OctOs Patreon Campaign - https://www.patreon.com/TOctOs
Donate to OctOS Development (PayPal)
Want To Build Your Own?
Check out the ReadMe on our GitHub for Instructions
Special thanks to
Our testers, without which, there would be no public releases for OctOs
We would also like to thank
AOSP
Open Gapps
LineageOS
Anyone else who has ever submitted Open-Source code
Click to expand...
Click to collapse
Follow Team-OctOS!
XDA:DevDB Information
Oct OS, ROM for the Xiaomi Mi 3
Contributors
aniket.lamba, manfromgta
Source Code: https://github.com/Team-OctOS
ROM OS Version: 7.x Nougat
ROM Kernel: Linux 3.4.x
ROM Firmware Required: A custom recovery (TWRP preferrable),ROM and Gapps zip file,knowledge on how to flash zip files.
Based On: Lineage
Version Information
Status: Stable
Created 2015-12-26
Last Updated 2017-04-29
OctOS 6.0.1
Team OctOs presents Oct-M.
We maintain a current release record and change-log on our website: http://www.teamoctos.com
- Please Do Not Mirror our files without talking to us. We can do that ourselves should we desire to. -​
Frequently Asked Questions
Q: Is this Android 6 (Marshmallow)?
A: Yes
Q: What code is Oct-M based on?
A: Starting with Oct-M, we've rebased OctOs on Aosp code.
Q: What happened to CM?
A: Octos was originally formed as an AOSP source rom. We have returned to those roots.
Q: Why isn't there XXXXXXX feature.
A: Shoot us a Suggestion if you want to see something added. While we are not going to promise to implement, we will always look into it
Q: But CM and all the others have..
A: ROM developers, including CM, build something they want to use. The ROM developer that includes something they won't run implies less than 100% effort to ensure it does work. As a team, we have similar goals and objectives. If XYZ ROM has a feature you want, and we don't include (or don't want to include), feel free to use XYZ ROM, or build your own custom version of Oct-M.
Q: Superuser or SuperSU?
A: Team OctOs uses SuperSU and is installed automatically.
Bugs:
Bugs happen. Our testers are very good at breaking things, but no where near as good as the rest of the Android public. In order to investigate and fix issues, we need the help of the users who are going to report them. The Android OS has many nifty features to help us in this, but only if we can engage the user to assist us.
Logs, Logcat, and the Android Debugging Bridge (ADB)
Like any other OS, Android has multiple log files that are generated and record the goings-on of the system. As a user, you have two basic ways to view and pull these to send to us. Without the information in the logfiles, there simply is not a whole lot of information to go on.
Log file APKs
Team OctOs recommends SysLog from the Android Market. This application will allow you to selectively pick any (or all) of the system logs, compress them into a .ZIP file, and allow you to save, email, move to your Copy/DropBox/Cloud Storage account, etc.
ADB Logcat
The Android Debugging Bridge (ADB) is a powerful tool available from Google as part of the Android Software Development Kit (SDK). Used for many things, being able to selectively see, in real-time, what your device is doing cannot be downplayed. While there is more setup involved, if you are doing consistent ROM flashing, you really should invest the time to get setup properly to do it.
ADB Logcat tutorial here: How to create a logcat log
Basic Instructions:
Download ROM .zip file, and grab your favourite gapps package
Reboot to Recovery (Note: Use Reboot to Recovery from Power Menu, Hardware-based boot to recovery, or adb reboot recovery - ROM Manager or similar software is NOT supported)
--- TWRP is the ONLY recovery Team OctOs uses - We do not support flashing on CWM ---
Factory Reset from TWRP
Flash ROM and GApps .ZIP files
Reboot
* Weekly Builds
* Release Builds
* Gapps 6.0 Mini
​
The Oct-M ROM installation script will automatically wipe /system, /cache, and /data/dalvik-cache. There is no need to do these before or after flashing the ROM unless you are instructed to by your GApps Provider
The foundation of the Android OS is the fact that is it open-source. We have all code we use internally in the creation of Oct-M available on our GitHub repositories.
Unless otherwise specified, all Oct-M builds use the device's stock kernel.
Team OctOs GitHub - http://www.github.com/Team-OctOs
Team OctOs Gerrit Review - http://www.teamoctos.com:8080
Team OctOs GPLv2 License - http://www.teamoctos.com/license/
Team OctOs Patreon Campaign - https://www.patreon.com/TOctOs
A Special thanks to @audahadi for his device sources.
Want To Build Your Own?
Check out the ReadMe on our GitHub for Instructions
Follow Us at the various websites below!
Kernel source - https://github.com/kernel-hut/android_kernel_xiaomi_cancro
Device - https://github.com/audahadi/android_device_xiaomi_cancro
Vendor - https://github.com/audahadi/proprietary_vendor_xiaomi
Bugs/Issues
[*]You tell me
Some ss
Rom is great for now.. all basic things works .. that is for now xD
Trying this rom for a few hours, I observed the followings:
The rom is smooth and rather fast.
Almost everything works properly.
Xposed works on this rom without any problem.
Battery life is reasonable.
Thank you so much, aniket.lamba.:good:
@aniket.lamba hi bro, I have a query.
But before that thanks a ton for the wonderful work you have done with this ROM :thumbup: Your Metallium ROM was my favorite LP ROM and I used it as my daily driver from the time it got released and never had to look at any other ROM after that as it was rock stable and super fast
Now for the query, was going through a post by John Cannon Jr on TeamOct G+ community where he mentioned that for non-nexus devices CM will be the base going forward. So for cancro-marshmallow will you continue the AOSP base or will change the base to CM in future? Asking this as there are lot of CM based ROMs available for cancro-marshmallow but not many AOSP based.
Cheers
rajib4 said:
@aniket.lamba hi bro, I have a query.
But before that thanks a ton for the wonderful work you have done with this ROM :thumbup: Your Metallium ROM was my favorite LP ROM and I used it as my daily driver from the time it got released and never had to look at any other ROM after that as it was rock stable and super fast
Now for the query, was going through a post by John Cannon Jr on TeamOct G+ community where he mentioned that for non-nexus devices CM will be the base going forward. So for cancro-marshmallow will you continue the AOSP base or will change the base to CM in future? Asking this as there are lot of CM based ROMs available for cancro-marshmallow but not many AOSP based.
Cheers
Click to expand...
Click to collapse
Initially it'll be CM based.As the ROM development progresses further,we might shift to the AOSP base.
marko94 said:
Some ss
Rom is great for now.. all basic things works .. that is for now xD
Click to expand...
Click to collapse
Are there CM themes? The app drawer shows it is, ur settings screenshot (might have missed), doesn't show that. Also the ROM is AOSP based.
No slow charging bug?
---------- Post added at 03:56 PM ---------- Previous post was at 03:48 PM ----------
aniket.lamba said:
Initially it'll be CM based.As the ROM development progresses further,we might shift to the AOSP base.
Click to expand...
Click to collapse
"might shift", does that mean it is CM based right now. The FAQ question and the 'based on' posted on the op shows AOSP atleast.
Me_Ashish_ said:
Are there CM themes? The app drawer shows it is, ur settings screenshot (might have missed), doesn't show that. Also the ROM is AOSP based.
No slow charging bug?
---------- Post added at 03:56 PM ---------- Previous post was at 03:48 PM ----------
"might shift", does that mean it is CM based right now. The FAQ question and the 'based on' posted on the op shows AOSP atleast.
Click to expand...
Click to collapse
For the initial stage it is CM based,this build which I've posted is an initial build (considering it still has issues) so we chose CM base as we draw more support of non-nexus devices,we'll shift the base to AOSP.I'll change the thread title so the users won't have a problem figuring out.
I have a doubt...does ambient display has a BUG or it's not working just for me.
nirjharmistry said:
I have a doubt...does ambient display has a BUG or it's not working just for me.
Click to expand...
Click to collapse
Never heard of someone who got Ambient Display working anytime. It just shows the, doesn't supports though.
Is it only me or the ROM doesn't support extended partition?
I tried flashing twice, but after installing GAPPS. Xposed doesn't get installed due to no space.
Also the maximum CPU frequency doesn't change at all
Me_Ashish_ said:
Is it only me or the ROM doesn't support extended partition?
I tried flashing twice, but after installing GAPPS. Xposed doesn't get installed due to no space.
Also the maximum CPU frequency doesn't change at all
Click to expand...
Click to collapse
Apparently you're not on extended partition. Your system is only 660mb instead of 1.2gb which means you're on stock partition. Did u flash MIUI recently? It might've reverted your partition to stock.
Sent from my MI 4 using Tapatalk
diongdyh said:
Apparently you're not on extended partition. Your system is only 660mb instead of 1.2gb which means you're on stock partition. Did u flash MIUI recently? It might've reverted your partition to stock.
Sent from my MI 4 using Tapatalk
Click to expand...
Click to collapse
That's not the case. Some ROMs work at stock even though you are on extended partition. Though I knew it's not my phone I still anyways re flashed extended partition ZIP leading in same result.
BTW installing MIUI or any other ROM via recovery doesn't make you loose ur extended partition.
Me_Ashish_ said:
That's not the case. Some ROMs work at stock even though you are on extended partition. Though I knew it's not my phone I still anyways re flashed extended partition ZIP leading in same result.
BTW installing MIUI or any other ROM via recovery doesn't make you loose ur extended partition.
Click to expand...
Click to collapse
If you've flashed the extended partition and it's still in 660mb means that you've failed. I know only flashing miui through fastboot gets you to stock partition. The point is you're on stock partition.
Sent from my MI 4 using Tapatalk
diongdyh said:
If you've flashed the extended partition and it's still in 660mb means that you've failed. I know only flashing miui through fastboot gets you to stock partition. The point is you're on stock partition.
Sent from my MI 4 using Tapatalk
Click to expand...
Click to collapse
Nope. I'm on extended partition since months. You haven't come across that kind of ROMs I mentioned it looks like. And I can't remember the exact name of few ROMs which had that issue right now.
And for the record after that ROM I installed CM12.1 without installing any repartition ZIPs and I had a 1.2G system size.
Me_Ashish_ said:
Nope. I'm on extended partition since months. You haven't come across that kind of ROMs I mentioned it looks like. And I can't remember the exact name of few ROMs which had that issue right now.
And for the record after that ROM I installed CM12.1 without installing any repartition ZIPs and I had a 1.2G system size.
Click to expand...
Click to collapse
Ooh did u mean that after flashing this ROM your system partition got reset to default (660mb)?
Cuz in the screenshot you attached it shows that you only have 660mb.
Sent from my MI 4 using Tapatalk
Me_Ashish_ said:
Nope. I'm on extended partition since months. You haven't come across that kind of ROMs I mentioned it looks like. And I can't remember the exact name of few ROMs which had that issue right now.
And for the record after that ROM I installed CM12.1 without installing any repartition ZIPs and I had a 1.2G system size.
Click to expand...
Click to collapse
yeah,same happened to me.. I am also on extended , but after flashing this rom , my partition go back to stock.. easy fix for that, go to recovery, backup rom, restore rom,reboot and now all is fine xD
marko94 said:
yeah,same happened to me.. I am also on extended , but after flashing this rom , my partition go back to stock.. easy fix for that, go to recovery, backup rom, restore rom,reboot and now all is fine xD
Click to expand...
Click to collapse
I too faced the same issue and with other ROMs too. There is an easy fix. If you are using twrp, go to Wipe->advanced Wipe Select "System" and click "repair or Change File system" below. Then Select "Resize". The issue will now be fixed.
If you are flashing ROM and Gapps, do the above step after flashing ROM before installing the Gapps.
Is this rom cm based or aosp based?

[Devs] Looking for a kernel base to work with? Start here.

Hello!
I'm hoping to get custom kernel & rom development up and running quickly for the G5 community, and have created a git repository which provides a kernel source base to start with.
What I've done is taken the v10a release sources and modified them to work with build directories and multiple variants. (should they be unlocked or receive the CodeFire treatment at any time)
Here's where to start: https://github.com/jcadduono/nethunter_kernel_g5/tree/stock-6.0
If you'd like a somewhat updated kernel, the stock-6.0.y branch will be patched from Linux 3.18.y branch at kernel.org, see:
https://github.com/jcadduono/nethunter_kernel_g5/tree/stock-6.0.y
Different from the absolute stock defconfigs, I've made the following changes:
Module signature verification disabled
Unnecessary debugging flags separated into debug_defconfig (use EXTRA_DEFCONFIG=debug_defconfig to enable them)
Flags that were previous set to module (=m) have been set to =y (built-in) in case incompatibilities are unable to load stock modules
Each known variant & target is listed in build.sh comments. The default variant when building with ./build.sh is h850 with debugging disabled.
When using the Makefile, VARIANT_DEFCONFIG=variant_xxx_defconfig adds the additional settings per variant to the target defconfig. (by default stock_defconfig)
build.sh is set up to automatically build a dtb.img after creating the kernel Image.gz based on whichever variant you've built for.
You can use ./menuconfig.sh to modify the stock defconfig, or you can copy the stock_defconfig to another name such as my_defconfig and use TARGET=my ./menuconfig or TARGET=my ./build.sh
It's easier to just set the default target in build.sh/menuconfig.sh - each have their configuration options near the top of the files.
Be sure to edit the config variables in build.sh and menuconfig.sh before using. The VERSION file gets appended to the kernel version shown in `uname` when using build.sh.
The toolchain must be pointed to the correct location before it can build. Be sure to have libncurses5-dev and colordiff packages installed for menuconfig.sh.
For a toolchain, I recommend using the GCC Linaro aarch64 5.3 2016.02 release. You can use basically any aarch64 toolchain though.
Download here: https://releases.linaro.org/compone...o-5.3-2016.02-x86_64_aarch64-linux-gnu.tar.xz
You can start by forking my repository on GitHub and giving it your own name if you like. Extra interesting commits are available in the other branches that you should be able to cherry-pick without issues should you be interested in them.
Looking to test your kernel Image.gz + dtb.img?
Look no further than my LazyFlasher repository!
See here: https://github.com/jcadduono/lazyflasher/tree/kernel-flasher
Simply do:
Code:
git clone -b kernel-flasher https://github.com/jcadduono/lazyflasher.git kernel-flasher
cd kernel-flasher
cp /path/to/Image.gz /path/to/dtb.img ./
make
(simply place your kernel Image.gz (optional) and dtb.img (optional) in the root of the repository and type make!)
And you'll have your own dynamic kernel flashing zip for custom recoveries!
The kernel-flasher repository is capable of great things. You can create scripts in patch.d to do anything you like.
Add files to the ramdisk-patch folder and create a script that copies them into the $ramdisk folder and they will be rebuilt into the ramdisk!
By default, no-verity-opt-encrypt is there as an example.
Using setprop in patch.d scripts allows you to set props in default.prop with ease.
Add functions to patch.d-env to make them globally usable across patch.d scripts.
See other branches for more examples, like how to add f2fs lines to the fstab, or patch for system mode SuperSU.
LazyFlasher is the installer used in the Kali NetHunter project. You can also find more examples in the kali-nethunter GitHub!
Good luck, and happy kernel developing!
Thanks so much for posting this.
Code:
./obligatoryn00bstatement
Sorry for not being too knowledgeable here (yet?) and if this sort of comment doesn't belong.
I am a Computer Science major who really wants to learn some skills to hopefully give back to the community.
Is this an area that I could be of use or should I perhaps spend more time going through material on the XDA-U site?
toefurkey said:
Thanks so much for posting this.
Code:
./obligatoryn00bstatement
Sorry for not being too knowledgeable here (yet?) and if this sort of comment doesn't belong.
I am a Computer Science major who really wants to learn some skills to hopefully give back to the community.
Is this an area that I could be of use or should I perhaps spend more time going through material on the XDA-U site?
Click to expand...
Click to collapse
I'm a little tired and somewhat intoxicated here at 3:45 AM so this is going to be a bit of rambling and so on...
While it's certainly a good idea to study up on what interests you before digging into it, sometimes it really can be easier just to dive in to your hobby.
I'm a high school drop out, never made it through college. Everything I've learned is by taking the great work done by the open source community and reading their code and applying it to other projects. That's the great thing about open source and nonrestrictive licenses. Everything is there for you to figure out, make changes, borrow code, run into problems, and the best part - search for solutions that others have already provided in their struggle to do exactly what you're doing.
Have an idea for a great feature? You can probably find it already implemented in another kernel somewhere.
Find the work someone else has done and modify it to fit your needs, but don't forget to give them credit for their work that you've used!
If you're going to start writing your own code, be certain to keep it tidy and variables/functions with meaningful names and comments so that not only others can understand and learn from it, but that you can return to the same code later on and understand it. Confusing code is how bugs tend to show up and become almost impossible to squash.
What I'm trying to get across here is don't be afraid to not be original. Don't be afraid to use others work to accomplish what you want, so long as they receive some attribution. The quickest way to learn how things work is by understanding what's already there and available to you.
You'll notice that there's projects all over XDA with special features ported from one device to another. Isn't it great having the all the best features people have added to other devices on one really nice device that you have?
PS I've never been on the XDA-U site before, so I can't give an opinion there.
I forgot what I was on about so I'll end this here lol.
?jcadduono you're on fire man thank you for everything you've been doing so far with such little resources.
Sent from my LG-H820 using XDA-Developers mobile app
jcadduono, thanks for the info and wonderful words of wisdom!
I totally agree on what you're saying and my goal is to try diving into this as a hobby. The hardest part for me isn't so much the coding part, but just figuring out a starting point to get grounded and build upon and I feel like what you've provided here is perhaps the starting point I need. Now it's just up to me to push myself in my free time.
Hi, i am new to kernel developing, but i did some roms myself before, so no total linux noob.
I cloned your 6.0.y and want to start from there, but im a little bit lost. Do i need to follow the steps @ github, or is your branch kinda pre setup ?
Toolchain path is also set to the one you gave a link too.
Pinu'u said:
Hi, i am new to kernel developing, but i did some roms myself before, so no total linux noob.
I cloned your 6.0.y and want to start from there, but im a little bit lost. Do i need to follow the steps @ github, or is your branch kinda pre setup ?
Toolchain path is also set to the one you gave a link too.
Click to expand...
Click to collapse
Hopefully once the toolchain path is set you should only need to run ./build.sh to actually build the kernel and dtb.
You may be missing some items for menuconfig.sh, which should just be solved by apt-get install colordiff libncurses5-dev
If building inside a ROM tree, it should be fairly simple for developers to adjust their ROM configs to add more to the kernel make command line, such as VARIANT_DEFCONFIG.
No matter what i do, kernel builds, but no dtb.img will be created. Any ideas where to look / what to test ?
I have stock-6.0.y, and did the h850 one.
Hi, is the stock-6.0.y branch removed?
I didnt find it. and need the right defconfig
greetz
mericon

[Guide] Source-build Android for Zuk Z2

Requirements
- Linux Mint 18 XFCE
- 20GB SWAP
- 130 GB HDD space
Configuring the OS
When the OS is installed, open terminal and issue:
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update && mkdir ~/bin && PATH=~/bin:~/sdk/tools:~/sdk/platform-tools:~/sdk/build-tools:$PATH && sudo apt-get install curl 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-7-jdk pngcrush repo schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline6-dev lib32z1-dev && curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
Download the Android SDK tools: https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
Extract them to your home folder and rename the folder containing them to 'sdk', so it matches the path that was set.
After issue the following in terminal:
Code:
android
Update it and get all of the required things for the version of Android you're building.
Downloading the source
We'll use my own personal choice... Issue the following in terminal:
Code:
PATH=~/bin:~/sdk/tools:~/sdk/platform-tools:~/sdk/build-tools:$PATH && repo init -u git://github.com/SlimRoms/platform_manifest.git -b mm6.0
It will ask you to configure your git Username and PW, you can either do it or ignore it; it's your prerogative.
After issue into terminal:
Code:
repo sync
Prepare to wait for quite a few hours.
Understanding the Layout
The layout of AOSP or any android firmware looks like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The important folders for basic building are the following:
- Device
The configurations for your device files should follow this layout.
Device/OEMname/Devicename
In the case of Z2 Pro it is 'Device/Zuk/Z2pro'
- Kernel
Kernel/OEMname/kernelname
The name of the kernel is specified in the main makefile of the Device configurations.
The kernel can be called anything in reality...
Vendor is where the files we cannot generate from source go; they are proprietary files that have already been created and must be pulled from an already working ROM that shares the same HW as the phone you are developing for.
Device Makefile operations explained
In my SlimROM Z2 configurations, the main makefile of relevance here is slim.mk
Code:
# Props
PRODUCT_PACKAGES += \
libloc_api_v02 \
libthermalclient \
datastatusnotification \
QtiTelephonyService \
shutdownlistener \
TimeService \
CNEService \
com.qualcomm.location \
dpmserviceapp \
qcrilmsgtunnel \
QtiTetherService \
colorservice \
ims \
imssettings \
qcnvitems \
libtime_genoff \
libbtnv \
qcrilhook
Normally VENDOR files are defined in the vendor folder; but I have defined them here instead which is fine.
Code:
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)
$(call inherit-product, vendor/zuk/z2pro/z2pro-vendor.mk)
The inherit-product command adds an outside makefile to the main makefile.
By noticing 'inherit vendor z2pro-vendor.mk' we are observe that SlimROM will use the makefiles in Vendor that has been specified.
Code:
$(call inherit-product, vendor/slim/config/common_full_phone.mk)
As we can see, this 'Common_full_phone' config is generic, it should be used for every model.
Certain models will inherit certain makefiles; as this is a x64 phone we are using:
Code:
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
This should be used on any x64 phone; things are quite generic across makefiles very few things are device-specific in reality.
Inside the device folder there is a .dependencies file; for example the contents of one file are as follows:
Code:
[
{
"repository": "android_device_qcom_common",
"target_path": "device/qcom/common"
},
{
"repository": "android_vendor_nxp-nfc_opensource_frameworks",
"target_path": "vendor/nxp-nfc/opensource/frameworks"
},
{
"repository": "android_vendor_nxp-nfc_opensource_libnfc-nci",
"target_path": "vendor/nxp-nfc/opensource/libnfc-nci"
},
{
"repository": "android_vendor_nxp-nfc_opensource_Nfc",
"target_path": "vendor/nxp-nfc/opensource/Nfc"
}
]
"target_path" will show you additional folders you may need from Github that are required for the device to function properly.
If you do not have your device dependencies it will not build, they must also be obtained.
Kernel explanation
Some kernels are useful across multiple devices; but how are they defined for an individual device?
They are defined with a file called 'defconfig', it is located here:
On a x86 device, we would use the ARM folder and not ARM64 but I digress.
In the 'Device' folder, there is a file called 'Boardconfig.mk', this is relevant to building the kernel.
Code:
TARGET_KERNEL_SOURCE := kernel/zuk/msm8996
TARGET_KERNEL_CONFIG := z2p_defconfig
TARGET_SOURCE = The kernel folder
TARGET_CONFIG = The defconfig for your device.
When trying to build with another kernel; the kernel author may be calling the defconfig something else so this field will need to be changed; or the name of the defconfig file will need to be changed.
I will not explain much about the 'Vendor' folder in this time, it requires higher-end methodology to determine what proprietary files a phone does and does not need.
Anyway, for the Z2 I have already made vendor configs so people here do not need to worry much about it although they are a little incomplete...
Understanding Github
Github is fantastic, rather than to mess around with terminal for pulling things from it I'd rather demystify it and for this reason am encouraging people to DL, unzip and stage things manually rather than to depend on .xmls
Notice "android_device_xiaomi_libra"
This is to say the contents of this git should end up in device/xiaomi/libra; you will need to create these folders and place the contents inside of them manually.
It is the same with kernel, and vendor files.
Building the OS
Now that device, kernel and vendor configurations are in place it's time to attempt a build, eh?
issue the following into terminal:
Code:
PATH=~/bin:~/sdk/tools:~/sdk/platform-tools:~/sdk/build-tools:$PATH && . build/envsetup.sh
The build engine will now start.
Issue the following:
Code:
breakfast z2
The breakfast command will prepare all the ingredients; if no error is thrown here next issue:
Code:
brunch z2
This will begin the building process for the Zuk Z2.
This will take a really long time to complete.
InterfaceNode said:
As the title says.
Click to expand...
Click to collapse
Slim would be nice.
Do you own device? Wouldn't it be hard to build a rom without having hardware to test/debug?
CM build for Z2 Pro has number of bugs and is not maintained.
Thanks.
crubbish said:
Slim would be nice.
Do you own device? Wouldn't it be hard to build a rom without having hardware to test/debug?
CM build for Z2 Pro has number of bugs and is not maintained.
Thanks.
Click to expand...
Click to collapse
I'll build an initial test of something closer to AOSP like Slim, or Omni.
I'll then ask for ADB logcat from users to determine which HW is not good.
The HW that is not good, it may be the result of vendor files being used; I will then look at a phone that uses identical HW and use their vendor files in applicable places to update it if required.
It's really easy to build for this device if CM will build for it; that's a great starting place and a lot of the heavy lifting has already been done by others to bring it up
InterfaceNode said:
I'll build an initial test of something closer to AOSP like Slim, or Omni.
Click to expand...
Click to collapse
Thanks for quick response. I'm prepared to be a tester when you have something ready. Good luck!
crubbish said:
Thanks for quick response. I'm prepared to be a tester when you have something ready. Good luck!
Click to expand...
Click to collapse
I'll have a build for you to test in maybe an hour or so..
Since we're all scratching each-others back; does anyone have a pull of the 6.0 Z2 stock ROM?
crubbish said:
Thanks for quick response. I'm prepared to be a tester when you have something ready. Good luck!
Click to expand...
Click to collapse
Good god I really hope so, I always want immediate feedback
If you're interested in testing for me on a more daily basis; I'll bring amazing firmware to this device that people have never heard of..
Edit: Maybe it will take a little under 2 hours? this device does not really seem to have configurations for an AOSP ROM.
I'm very sure that my configurations will be good; but I'm not going to lie I did use some prebuilt things so I may run into conflicts if the device configurations want something that doesn't exist in AOSP.
At some point I'll write about this, source-building for a device is not a mystical process that requires a person to own the device; the only benefit to owning the device would be to extract ADB after building has finished.
Owning a device will not assist you in the build process unless it is to pull proprietary files from the stock ROM, users generally post Stock ROMs anyway so really.
I see people getting ready to collect donations and building this up like it's some kind of epic challenge or whatever.
This device is already being staged for Mokee, it's not going to be hard to build for it since someone else has already done all of the hard stuff.
Making this thread is more or less like seeing people on the sidewalk; I'm driving by and it's raining so I want to go through the puddle on the side of the street where they are walking.
Naturally I'll also accept donations, either PayPal or BTC is fine for me!!!!!!!!!!!
But I'm going to begin working irrespective of that because fundamentally It's not about the money for me
The funny thing is on a morality level it feels almost spiritually wrong to even accept donations since another person brought up all of the core configurations every other person; including people in the Nameless ROM thread will use in the future lol
You are doing this for Z2 or Z2 Pro?
shaunydub said:
You are doing this for Z2 or Z2 Pro?
Click to expand...
Click to collapse
Fk it, I'll do both right?
The Z2 is building presently but I guess I could also do the Z2 pro
But I guess it would take another hour or so, if I also add the Z2 pro to my s-tuff2do list
InterfaceNode said:
Fk it, I'll do both right?
The Z2 is building presently but I guess I could also do the Z2 pro
Click to expand...
Click to collapse
I'm excited for that to happen. Since mokee rom has a few minor bugs which didn't get fixed by now, I would be surprised if someone walks by and build like that. Nevertheless, time will tell and it would be nice if you could build dirty unicorns ????
MacLaughlin said:
I'm excited for that to happen. Since mokee rom has a few minor bugs which didn't get fixed by now, I would be surprised if someone walks by and build like that. Nevertheless, time will tell and it would be nice if you could build dirty unicorns ????
Click to expand...
Click to collapse
I would hope interested folks can give me the name of their device and the ADB.
Z2 is confirmed by me (looking at it) as stable enough to begin bringup of the following ROMs:
http://www.vibeui.com/
Zuk OS 6.0
I would like to begin collecting feedback on builds of these two ROMs at the same time as feedback on all AOSP builds.
To build DU is easy, I will write about how to do it for end-users and post configs to be used with it; but for now I want to first push stable AOSP and then consider what firmware to bring that is actually interesting.
Who cares in reality about DU or whatever, it all is essentially AOSP anyway compared to vendor ROMs
hardware/qcom/media-caf/msm8996/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp: In function 'void* async_message_thread(void*)':
hardware/qcom/media-caf/msm8996/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp:259:29: error: 'V4L2_EVENT_BITDEPTH_FLAG' was not declared in this scope
if(ptr[2] & V4L2_EVENT_BITDEPTH_FLAG) {
^
hardware/qcom/media-caf/msm8996/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp:263:29: error: 'V4L2_EVENT_PICSTRUCT_FLAG' was not declared in this scope
if(ptr[2] & V4L2_EVENT_PICSTRUCT_FLAG) {
^
target thumb C++: libOmxVenc_32 <= hardware/qcom/media-caf/msm8996/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
hardware/qcom/media-caf/msm8996/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp: In member function 'virtual OMX_ERRORTYPE omx_vdec::component_init(OMX_STRING)':
hardware/qcom/media-caf/msm8996/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp:2343:25: error: 'MSM_VIDC_PIC_STRUCT_PROGRESSIVE' was not declared in this scope
m_progressive = MSM_VIDC_PIC_STRUCT_PROGRESSIVE;
Click to expand...
Click to collapse
Build for Z2 errored with that code.
To resolve it the important thing to note is: V4L2_EVENT_BITDEPTH_FLAG
Doing a search of it in Git brings me to:
https://github.com/MoKee/android_ke...mmit/b9534998dcc1c20afd01ed95bb4ef5b3a34fbdbd
Although this device is not Nubia, Nubia is very close and can clearly be used as a guide-line to determine the commits this kernel needs.
The red HW errors during building indicate the kernel does not align with the source; to resolve this I would need to either remove the functions relating to this from the source-code of AOSP or I would need to add it to the kernel.
In the spirit of not being regressive, I decided to add it to the kernel and am building again.
I guess I'll write about how I resolved certain things here as I go along
Mokee kernel for this ROM is broken somehow, I speculate this is intentional so other people cannot build it but who knows right.
Meanwhile I've begun bringup on the kernel found here: https://github.com/RoyMcBaster/kernel_zuk_8996
No idea who this guy is, but his kernel doesn't seem to be sabotaged just incomplete so I'll use it as a base
Edit: Under my hardware, a build with no pre-built binaries takes around 40 minutes.
Each time I need to resolve the kernel in this way, I must rebuild entirely from the ground up; I am unsure of how many other alignment errors exist in this kernel but I imagine a few.
In a perfect world none but probably thats not happening, but it is ok I enjoy being challenged
Gonna follow this thread with much interest. You might want to have a look at this thread: http://zukfans.eu/community/threads/development-of-cyanogenmod-need-help.395/
Perhaps it helps you, at least for the ZUK Z2 Pro.
Here is one more kernel: http://zukfans.eu/community/threads/kernel-port-cm13-m-kernel-v1-1-port-22-09-2016.478/
Also you may take smth from existing CM builds: http://bbs.zuk.cn/z2/t135170/ (download link)
.: SID :. said:
Here is one more kernel: http://zukfans.eu/community/threads/kernel-port-cm13-m-kernel-v1-1-port-22-09-2016.478/
Also you may take smth from existing CM builds: http://bbs.zuk.cn/z2/t135170/ (download link)
Click to expand...
Click to collapse
Thank you, I've resolved the kernel for Z2 plus and will begin pushing builds of it as part of open-alpha.
Once I can determine both are stable we'll begin engaging in satanism; I'll try to do something interesting like TouchWiz or Sense.
I'm going to buy this device, but true to style I want to forward the development of it, bring some incredible OS to it.
Once both of my builds are stable I'll add more to this thread because I will be able to post my configs and explain how2use; things will move quickly here I hope
InterfaceNode said:
Thank you, I've resolved the kernel for Z2 plus and will begin pushing builds of it as part of open-alpha.
Once I can determine both are stable we'll begin engaging in satanism; I'll try to do something interesting like TouchWiz or Sense.
I'm going to buy this device, but true to style I want to forward the development of it, bring some incredible OS to it.
Once both of my builds are stable I'll add more to this thread because I will be able to post my configs and explain how2use; things will move quickly here I hope
Click to expand...
Click to collapse
That's great!
Please stay with AOSP and don't get to TouchWiz, Sense or whatever OEM framework!
vittogn said:
That's great!
Please stay with AOSP and don't get to TouchWiz, Sense or whatever OEM framework!
Click to expand...
Click to collapse
Well I always feel why be limiting, right?
Additionally I noticed the CM configs I was basing off of from Z2 has intentionally broken code-lines.
There's nothing worse than an overprotective developer
InterfaceNode said:
Well I always feel why be limiting, right?
Additionally I noticed the CM configs I was basing off of from Z2 has intentionally broken code-lines.
There's nothing worse than an overprotective developer
Click to expand...
Click to collapse
Thanks
InterfaceNode said:
Well I always feel why be limiting, right?
Additionally I noticed the CM configs I was basing off of from Z2 has intentionally broken code-lines.
There's nothing worse than an overprotective developer
Click to expand...
Click to collapse
I see your point?
What do you mean with intentionally broken code-lines?
Are you developing also a CM?
Thanks again.
Look forward to buy a Z2 when your rom will be ready!
Flyme would be nice to Even on a few of my Meizu's it's not stable XD

Categories

Resources