About QC table of device tree - Android Q&A, Help & Troubleshooting

Hi!
Now I have got the boot.img of my device from ZTE (my mobile is ZTE A460).
I undersand that it includes header, kernel, ramdisk, second, and device tree. In fact, I have written a script for getting the data (see: github: jbgg/xbootimg). That script works for my mobile phone at least.
With that data, I have extracted the device tree. But this device tree is not a dtb as is documented in Linux kernel: Documentation/devicetree/booting-without-of.txt, where the magic number is 0xd00dfeed. Instead I have found the magic number 'QCDT', searching in google, I only have found two (similar) documents about QC table of device tree (github: xiaolu/mkbootimg_tools and github: sonyxperiadev/mkqcdtbootimg). But I didn't found official documentation. Where is the official documentation about QC table of device tree?
Maybe the last question could be easily answered if more information about how the /boot partition is reading. The /boot partition is reading by bootloader, is the boot loader who read the QC table of device tree and choose one device tree blob for boot the kernel? Or what is design a table of device tree for?
Bosco.
Sorry, I can't post url because I don't have 10 post or more.

Maybe this is a wrong place to ask.
Where can I ask information about this?

Hey i have the same device and i try give support to this phone, at the day the A460 only have CM12.1 and CM13 stable, how i can comunicate in private?

zjbggz said:
Hi!
Now I have got the boot.img of my device from ZTE (my mobile is ZTE A460).
I undersand that it includes header, kernel, ramdisk, second, and device tree. In fact, I have written a script for getting the data (see: github: jbgg/xbootimg). That script works for my mobile phone at least.
With that data, I have extracted the device tree. But this device tree is not a dtb as is documented in Linux kernel: Documentation/devicetree/booting-without-of.txt, where the magic number is 0xd00dfeed. Instead I have found the magic number 'QCDT', searching in google, I only have found two (similar) documents about QC table of device tree (github: xiaolu/mkbootimg_tools and github: sonyxperiadev/mkqcdtbootimg). But I didn't found official documentation. Where is the official documentation about QC table of device tree?
Maybe the last question could be easily answered if more information about how the /boot partition is reading. The /boot partition is reading by bootloader, is the boot loader who read the QC table of device tree and choose one device tree blob for boot the kernel? Or what is design a table of device tree for?
Bosco.
Sorry, I can't post url because I don't have 10 post or more.
Click to expand...
Click to collapse
I have found the official documentation in LittleKernel source, sorry I can't write the url (because rules of this forum). If you want it, ask me.

Related

[Q] Making android kernel compatible with ubuntu?

Hello.
I noticed that kernels for ubuntu seem a bit old. I was thinking that maybe someone could modify cm10(or 3.0.21) kernel to support ubuntu/teach me how to add ubuntu support to android kernel. I did a bit googling, but results were filled with those loop ubuntus, not native.
I am also thankful if someone can point me to right direction.
(Trevd, i am counting on you )
Sent from my GT-I9100 using xda app-developers app
julle131 said:
Hello.
I noticed that kernels for ubuntu seem a bit old. I was thinking that maybe someone could modify cm10(or 3.0.21) kernel to support ubuntu/teach me how to add ubuntu support to android kernel. I did a bit googling, but results were filled with those loop ubuntus, not native.
I am also thankful if someone can point me to right direction.
(Trevd, i am counting on you )
Sent from my GT-I9100 using xda app-developers app
Click to expand...
Click to collapse
Well as seeing as you ask so nicely, I'm far from an expert however especially in the ways of ubuntu kernels, A1Pha got the original ubuntu image going but ubuntu have done an official arm release now so that changes things ( probably ) I can only point you in the direction of more, hopefully better resources.
The Blaze Tablet seems to have have been the Development Platform for the G9 so you'll probably get some purchase from following that route.
Here's some links for you.
http://omappedia.org/wiki/Source_Trees
http://omappedia.org/wiki/OMAP_Ubuntu_Main
My days on the G9 could well be numbered, I foolishly overwrote the bootlloader in one of my more Laissez-faire moments. meh! That's what I get for having a caliver approach to consumer electronics.
trevd said:
Well as seeing as you ask so nicely, I'm far from an expert however especially in the ways of ubuntu kernels, A1Pha got the original ubuntu image going but ubuntu have done an official arm release now so that changes things ( probably ) I can only point you in the direction of more, hopefully better resources.
The Blaze Tablet seems to have have been the Development Platform for the G9 so you'll probably get some purchase from following that route.
Here's some links for you.
http://omappedia.org/wiki/Source_Trees
http://omappedia.org/wiki/OMAP_Ubuntu_Main
My days on the G9 could well be numbered, I foolishly overwrote the bootlloader in one of my more Laissez-faire moments. meh! That's what I get for having a caliver approach to consumer electronics.
Click to expand...
Click to collapse
Thanks for answering. I'm out of thanks for today, so i press that button when i have more.
Now to business.
After doing some research, and asking few questions on #ubuntu-arm, this seems a bit hard project because there are no sources. There is no source for CM10 kernel(Or i can't read the github) nor Ubuntu kernel, so i can't just apply tweaks of them both to archos 3.0.8+ kernel. A way to unpack the zimage from ubuntu kernel and cm10 kernel would help, but atleast the script i tried couldn't unpack the zimage of ubuntu. Lets see what i figure out next.
julle131 said:
After doing some research, and asking few questions on #ubuntu-arm, this seems a bit hard project because there are no sources. There is no source for CM10 kernel(Or i can't read the github) nor Ubuntu kernel, so i can't just apply tweaks of them both to archos 3.0.8+ kernel. A way to unpack the zimage from ubuntu kernel and cm10 kernel would help, but atleast the script i tried couldn't unpack the zimage of ubuntu. Lets see what i figure out next.
Click to expand...
Click to collapse
Not sure what you mean by the CM10 Kernel, I don't think CM have any different settings from what is required by JellyBean itself. Plus the Kernel we originally used for the Archos CM10 is an ICS kernel with IPV6 Mangling adding, we got away with that because the Init.rc used to boot the Rom is a mashed up ICS Version. After thinking about it let me add the bit of knowledge I think I do know.
The kernels on arm platforms, to paraphrase Linus Tovalds was a complete mess, something which Linaro are working hard to fix, and are unique to the SOC vendor.
You need to get the Archos specific sources which are located on GItorious @ git://gitorious.org/archos/archos-gpl-gen9-kernel-ics.git, clone the 3.0.21 branch, in the directory there's a file called linux.config.g9 ( or something similar ). that's the config file. I just copy that to .config, change the settings I need to (if any) compile. That should setup an archos kernel which should run android
Code:
git clone git://gitorious.org/archos/archos-gpl-gen9-kernel-ics.git -b linux-icc-3.0.21
cp linux.config.g9 .config
make menuconfig
make -j8
Like I say I was thinking about it and the main difference between a standard kernel and android kernels is the binder, the switch class support and the log driver ( this is things I've noticed when building an android x86 Kernel )
When doing menuconfig the Android Driver settings are found in devices/staging/android, I suppose a place to start is to turn them off then switch on SYSV IPC ( i think that's in genral kernel settings ), from what I understand this is the sysv binder and should create a node at /dev/binder, standard kernel switch class support is set in Device Drivers ( Switch Class Support ).
I'm not sure about logging , It basically breaks down like this. The Android Kernel has a specific logging driver this creates device node at /dev/log/main /dev/log/system etc , Ubunutu ( on x86 at least ) has a single log device node which is created at /dev/log, I don't know weather this is something created by the kernel or something created in userspace by syslogd or something similar. I also don't know whether the Android Logs are compatible with ubuntu, or the android binder for that matter. I'll try and boot my x86 ubuntu with my Android Kernel later on , I suspect It won't work but speculation is one thing, knowing for sure is better
With regards to unpacking the zImage, I'll say this , Not all zImages are created equal , I notice you are using a samsung mobile ( galaxy s, if I'm not mistaken ) , so you're probably using the samsung zImage as a frame of reference... How I understand it Samsung pack the initramfs into the zImage, similar, but not same to the way android AOSP pack a boot.img. Samsung however do this in kernel itself, this is why Samsung zImage a) can be unpacked and b) require different tools than the standard tools used for unpacking boot images which work on just about every other device ( expect Archos of course ) . So you generally don't unpack zImage because It's just a binary blob that contains all the kernel functions, this is in the assembly language of whatever architecture you built your kernel for.
Given all that info you should now be able to build a working archos android kernel ( I assume you using linux etc and your not stupid ) , You now need the Ubuntu side of things..... Have you asked in the Archos G9 Ubuntu Development thread, they may be able to shed light on the changes to the config you need to make or alternativaly you could download the Ubuntu for Arm OMAP Image from https://wiki.ubuntu.com/ARM/OMAP , unpack/mount it and see if there is the kernel .config file, It is normally packaged somehow with the distro for example x86 lubuntu has .configs in /lib/modules/3.5.0-19-generic/build/.config, the arm distro may have something similar. Then it's a case of see what configuration options are different, You can't just copy the config whole sale however because there are Archos Specific board settings in the Archos Kernel. Failing that the kernel sources will be somewhere as it is a legal requirement under the GPL and Cannonical are compliant, at least I've not read anywhere to the contrary.
This is just really how I understand it at the minute, Some of it could be inaccurate or just plain BS but hopefully should give you something to run with, there is a bit of a barrier to entry on the whole subject kernels/android kernels as the information is in little pieces all over the internet, when I was first getting to grips with it, it did feel like a bit a of treasure hunt for knowledge. Also knowing the Keywords to search for in the first place can be difficult It sounds quite an interesting challenge, shame about my brick!!
If you want to understand more about the kernel generally ( and lets face it, who doesn't ) then Linux Kernel in a nutshell ( http://www.kroah.com/lkn/ ) is a free e-book written by one of the kernel maintainers a should be a useful reference.
JUST IN CASE: Don't forget prefixing a filename with a fullstop (.) makes that file hidden and won't display in normal file listings, using ls -a to display all file in a directory
The CM10 kernel i was refering to is the CM10 in dev section. I thought there were other "hacks" than just a IPv6 addon, and that's why i counsidered it as a totally diferent kernel.
I think i need to download the kernel source as soons as i get to my laptop then. I have some experience on it, because i have made a few builds of B2G, but that was mainly just: download source, choose the device and build.
For the differences, that is what i consider as the hardest part. Merging them and then getting the kernel to build might take some time. Luckily I have plenty of time.
For the zImage, I was trying to unpack the ubuntu zImage one, because I'm working on archos device . Unpacking Galaxy S2 kernel wouldn't make any sense. atleast to me . I was trying to use a general unpacker, but it didn't work, just as you wrote.
For the OS & Knowledge, i am using linux indeed. Backbox, which is based on ubuntu 11.04 to be precise. I didn't even think about unpacking the IMG file... Maybe i am stupid . I think i am able to mount it to folder, so it is easy to explore.
I think I know the basics, and folders starting with . is part of them
Lets see what happens the next time i pick my laptop, boot it and start fooling around :good:.
Edit: Well, after the menuconfig, i can't fand anything related to ipv6 mangling. There was a file on the root of cloned folder called linux.config, but it was the default config for kernel, not archos specific.
julle131 said:
The CM10 kernel i was refering to is the CM10 in dev section. I thought there were other "hacks" than just a IPv6 addon, and that's why i counsidered it as a totally diferent kernel.
I think i need to download the kernel source as soons as i get to my laptop then. I have some experience on it, because i have made a few builds of B2G, but that was mainly just: download source, choose the device and build.
For the differences, that is what i consider as the hardest part. Merging them and then getting the kernel to build might take some time. Luckily I have plenty of time.
For the zImage, I was trying to unpack the ubuntu zImage one, because I'm working on archos device . Unpacking Galaxy S2 kernel wouldn't make any sense. atleast to me . I was trying to use a general unpacker, but it didn't work, just as you wrote.
For the OS & Knowledge, i am using linux indeed. Backbox, which is based on ubuntu 11.04 to be precise. I didn't even think about unpacking the IMG file... Maybe i am stupid . I think i am able to mount it to folder, so it is easy to explore.
I think I know the basics, and folders starting with . is part of them
Lets see what happens the next time i pick my laptop, boot it and start fooling around :good:.
Click to expand...
Click to collapse
The 3.0.31 Kernel started by Quallenauge in the dev section is an Highly Expirimental effort. this was started before Archos released the 3.0.21 Kernel with their 4.0.2x roms which covered what was trying to be achieved by this development, It's best left alone unless you really want to get you're hands dirty with device bring up code, There's a version on my github which I think boots the G9A101's as well as the 80's......... anyway
You shouldn't have to do any merging of code, more a case of selecting the right options in the config, Thinking back, I've have booted Ubuntu using mainline kernel sources from kernel.org that I built myself so that kinda of suggests there's nothing special about ubuntu's kernels per se' .
Your main problem won't be with building , more booting, It should compile fine but I wouldn't be surprised to be looking at a blank screen then your problem is monitoring the output....There's an option in the archos config to get early debug output over USB, I think there's some modification you need to make to the USB Cable, Quallenauge knows about that, he did it , I was ghetto and used adb for my debugging. which can be probably made to work when booting ubuntu but I'd go the correct route , I just have my wierd ways of doing things.
Another thing that spring to mind with android "specialisms". Android runs /init in the root directory ubuntu normally likes /sbin/init. This is something that is specified again in the kernel config using the kernel cmdline option , just something to be aware of... If anything else springs to mind I'll let you know.
So I suppose as you say, Just fool around and see what happens. :good:
I think I know the basics, and folders starting with . is part of them
Click to expand...
Click to collapse
Just Checking LOL.
trevd said:
The 3.0.31 Kernel started by Quallenauge in the dev section is an Highly Expirimental effort. this was started before Archos released the 3.0.21 Kernel with their 4.0.2x roms which covered what was trying to be achieved by this development, It's best left alone unless you really want to get you're hands dirty with device bring up code, There's a version on my github which I think boots the G9A101's as well as the 80's......... anyway
You shouldn't have to do any merging of code, more a case of selecting the right options in the config, Thinking back, I've have booted Ubuntu using mainline kernel sources from kernel.org that I built myself so that kinda of suggests there's nothing special about ubuntu's kernels per se' .
Your main problem won't be with building , more booting, It should compile fine but I wouldn't be surprised to be looking at a blank screen then your problem is monitoring the output....There's an option in the archos config to get early debug output over USB, I think there's some modification you need to make to the USB Cable, Quallenauge knows about that, he did it , I was ghetto and used adb for my debugging. which can be probably made to work when booting ubuntu but I'd go the correct route , I just have my wierd ways of doing things.
Another thing that spring to mind with android "specialisms". Android runs /init in the root directory ubuntu normally likes /sbin/init. This is something that is specified again in the kernel config using the kernel cmdline option , just something to be aware of... If anything else springs to mind I'll let you know.
So I suppose as you say, Just fool around and see what happens. :good:
Just Checking LOL.
Click to expand...
Click to collapse
At the moment i'm trying to find the archos config file. there is a defcon file, which looks like a config file in arch/arm/configs called android_archos_defcon. It sounds correct. Next thing for me to do is to find the right place to put it. I guess the root of the project is correct, and rename it to .config and linux.config. After building I need to test it. [email protected] or 4.0.26 root will suffice, right? I also need to figure out if there is a way to force adb on through kernel. And the IPv6 Mangling is nowhere to be found
julle131 said:
At the moment i'm trying to find the archos config file. there is a defcon file, which looks like a config file in arch/arm/configs called android_archos_defcon. It sounds correct. Next thing for me to do is to find the right place to put it. I guess the root of the project is correct, and rename it to .config and linux.config. After building I need to test it. [email protected] or 4.0.26 root will suffice, right? I also need to figure out if there is a way to force adb on through kernel. And the IPv6 Mangling is nowhere to be found
Click to expand...
Click to collapse
The config file " linux.config.g9" should be in the root kernel directory, if it's not there then your on the wrong branch and you need to checkout the 3.0.21 branch explicitly using
Code:
git checkout linux-ics-3.0.21
If your using ICS builds to check with, which I probably recommend then don't worry about IPV6 managling , I don't think It's named that exactly but something like that!, For reference , I've just had a check the option is "Networking support/Networking options/Network packet filtering framework (Netfilter)/IPv6: Netfilter Configuration /Packet Managling"
You have to look pretty deep on some of these settings
As a test. Boot with a normal kernel configure your android debug options , then swap the kernels out , that should give you adb while booting, when I've tried to force adb on an uncofigured rom it got a bit confused with itself
If your struggling a bit with git, http://gitimmersion.com/ has a great tutorial you can step through in about 10 minutes to get the basics and get it configured a bit better
---------- Post added at 09:31 PM ---------- Previous post was at 09:20 PM ----------
EDIT: Make sure you building for arm as well
Code:
$ export ARCH=arm
$ export SUBARCH=arm
$ export CROSS_COMPILE=arm-eabi-
Reference: http://source.android.com/source/building-kernels.html
Huuuh i'm late... most had been pointed out already.
Just to add this...
As you might know Android is put on top of a Linux base system more or less.
In most cases a kernel built for Android will suit most linux distributions as well.
Trevd already highlighted the main aspects.
The other way round is more evil... unmodified linux kernel (or a kernel set up to run well with Ubuntu) will refuse to boot up an Android system.
Some addon's on the default config may be nice though, depends on how the whole rootfs stuff is arranged in the end and if your system heavily depends on udev and stuff.
Keep track of the startup scripts at /etc/init.d.
It's good to have an extensive look at the /etc directory of your distribution image... to much to point at here.
The kernel may handle to boot into a lot of different scenarios.
On the Archos tablets initramfs plays an important role.
You may even tweak this jumpboard and locate your final rootfs on an USB stick if you like.
It's all about handling mounts, chroot and similar during start up.
There are limits on the Archos with stock loader though, because you might need to influence the kernel command line at a certain point.
I'm aware that this is not very specific but there are so many ways to set things up.
Just follow the useful links trevd gave already... these are good starting points :fingers-crossed:
...and just to add this:
I don't speak of fine tune the system in the end. This is another story and sometimes very hard stuff, where you may need to reverse engineer some proprietary libs or executables.
Best regards,
scholbert
Well, I have now built my first kernel... And it was 3.0.8+... I think I downloaded wrong source . I have ipv6 mangling enabled on it, so I should try it with CM10 now. I think I should search the 3.0.21 source, and download it.
Edit: Well, my 3.0.8+ Kernel image can boot CM10, AOKP and 4.0.7 roms... Now i have to figure out why i downloaded 3.0.8+ kernel and not 3.0.21 kernel. Maybe i had wrong branch.
Edit:Yep, wrong branch. I did realize when i downloaded the srce that it informed that the branch does not exists. i had icc instead of ics
Do you have any tips where i can find info about kernel modifications, like adding governors? I tried adding few, but all i got was bunch of errors. I propably forgot something.
Sent from my GT-I9100 using xda app-developers app
mer
Still working on this? I have been using Mer kernels with Ubuntu and they seem to be working fine.
Archos Gen9 Mer Adaptation Kernel --> http://gitorious.org/archos-gen9-mer-adaptation-kernel/
Archos Gen9 Mer Adaptation Kernel ICS --> https://gitorious.org/archos-gen9-mer-adaptation-kernel/archos-gen9-mer-adaptation-kernel-ics
I am using the 3.08 kernel from a Plasma Active distribution. --> http://share.basyskom.com/plasma-active/archos_gen9.html
Just mount the data partion in linux and convert it to ext4, write the linux image to it. Then cp the files from mer /boot /lib/modules to new rom, modules file in etc to load your modules, modify fstab, cp mtev.so to /usr/lib/xorg/modules/input, change or add a few other files.
/etc
modules
Code:
cypress_tma340
tr16c0_i2c
hso
compat
cfg80211
mac80211
wl12xx
wl12xx_sdio
cpt_i2c_tsp
pixcir_i2c_tsp
hci_uart
fstab
Code:
/swap none swap sw 0 0
/dev/mmcblk0p2 /media/system ext4 ro,noauto,users,uid=1000,gid=0,noatime 0 0
/dev/mmcblk0p4 /media/data ext4 ro,noauto,users,uid=1000,gid=0,noatime 0 0
none /proc proc rw,relatime,noexec,nosuid,nodev 0 0
none /sys sysfs rw,relatime,noexec,nosuid,nodev 0 0
none /dev devtmpfs rw,mode=0755 0 0
none /dev/pts devpts rw,relatime,gid=5,mode=0620,ptmxmode=0666 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
binfmt_misc /proc/sys/fs/binfmt_misc rw,noexec,nosuid,nodev 0 0
none /sys/fs/fuse/connections fusectl rw 0 0
none /sys/kernel/debug debugfs rw 0 0
none /dev/shm tmpfs nodev,nosuid,noexec 0 0
none /dev/bus/usb usbdevfs defaults 0 0
none /sys/kernel/security securityfs (rw) 0 0
/etc/udev/rules.d
70-persistent-net.rules
Code:
# net device ()
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:28:90:64:31", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
# USB device 0x9710:0x7830 (usb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:3b:04:02:6c", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
70-touchscreen.rules
Code:
KERNEL=="event*", SUBSYSTEM=="input", SUBSYSTEMS=="input", ATTRS{name}=="cypress-tma340", SYMLINK="input/touchscreen"
/usr/share/X11/xorg.conf.d
Add to the end of 10-evdev.conf, cypress-tma340 is the touchscreen on my G9.
Code:
Section "InputClass"
Identifier "Archos Touchscreen"
MatchProduct "cypress-tma340"
Option "Ignore" "off"
Option "CorePointer" "on"
Driver "mtev""
EndSection
openSUSE --> http://en.opensuse.org/openSUSE:eek:penSUSE_on_your_ARM_board
Ubuntu --> https://wiki.ubuntu.com/ARM/OMAP
Kubuntu 12.10 --> http://cdimage.ubuntu.com/kubuntu/releases/12.10/release/kubuntu-12.10-desktop-armhf+omap4.img
Please i am using Backbox Linux Distribution (Dual booted ) wit my windows 7....... now i wish to use a dail up connection on my modem !! PLEASE HOW DO I GO ABOUT IT ...
Sent from my L3 using XDA Free mobile app

How to create device tree?

How to create device tree for a phone from scratch?
Grab another device's tree (one that's similar to your device) and modify it to make your own....
I think you're already found how a device tree works. But here is a nice post with some good links in it. Just for others looking for the answar: http://forum.xda-developers.com/showthread.php?t=1906691

Linux NOOB; Where to extract Device Tree, Vendor, Kernel?

I'm running Ubuntu 16.4 in VirtualBox and I'm trying to follow this guide for creating a custom ROM. Problem is, I am completely new to Linux and I'm literally copying and pasting command line. I don't understand what everything does. I'm just kind of doing it for now, learning as I go. So far, everything has worked fine. But now, I'm stuck at this part:
Now before starting with Building guide you have to Download your Device Identity That is has follows
1) Device Tree
2) Vendor
3) Kernel
The Above files are very Vital Parameters of building they specify your device and its Characteristics.
Now you might think from where you have to download those files?
Don't be confused its simple Search in our device forum for CM Tree and Kernel and Vendor. The Dev of CM for your Device forum will specify it in his ROM thread.
Click to expand...
Click to collapse
I found my device's device tree on github: https://github.com/j03lpr86/android_device_samsung_afyonltetmo
What do I do with it? Download the zip and put it somewhere and then extract it somewhere? If so, where? Or do I use the "Clone with HTTPS" link? If so, how do I execute it in the terminal?
Same questions with the vendor I found: https://github.com/j03lpr86/android_vendor_samsung_afyonltetmo
As for the kernel, what do I do for that? XDA doesn't have my device listed (Galaxy Avant). I downloaded the stock ROM from Sammobile. Do I extract kernel.img from that? If so, where do I place it?
There are just too many assumptions that the author of the guide makes and I don't understand what to do at this point.
have you looked on git hub for them?

[CLOSED][PARTITION][TREBLE] Project Treble for Samsung Galaxy S8 [dreamltexx][15.02.2019]

- T R E B L E Y -
Android Partition Treblerizer
A tool able to seamlessly create / remove the vendor partition from within TWRP​
INTRODUCTION
The creation of a tool able to create and remove the supplier partition from TWRP, so a computer was not required. So I created this flaming TWRP ZIP which can create and remove the vendor partition from the userdata system or partitions without a computer and without deleting the files in the mother partition in the recommended configuration.
Trebley, finally, also expands on our much loved Galaxy S8, bringing with it Project Treble on the much loved device.
The tool will try to resize the mother partition without deleting it, either during the creation and removal of the supplier partition. However, this can only be done when the mother partition is ext4, only when the supplier partition is at the end of the mother partition and when the mother partition is not encrypted. The recommended configuration is the one that is obtained by selecting the first option in each option: subdividing 512 MB from the end of the system partition. A reboot is required after applying the patch to the partition table because the kernel needs to reload it before doing anything else.
REQUIREMENTS
Due to the use of a key detection binary, it is compatible only with ARM and ARM64 devices running TWRP. So far I have tested it in the Samsung Galaxy S8 but It should work in any compatible device. I made it this way so other legacy devices could transition to Treble ROMs + GSI, and Android Pie. Please let me know about other devices using this tool!!!!!
INSTALLATION
WARNING, THIS SOFTWARE COULD WIPE ALL THE DATA IN YOUR DEVICE, INCLUDING THE INTERNAL STORAGE.
IT REQUIRES TWRP CUSTOM RECOVERY IN AN UNLOCKED DEVICE, OTHERWISE YOUR DEVICE COULD BE BRICKED AND IF YOU FOLLOW MY STEPS BELOW, YOU WILL LOSE YOUR WARRANTY, KNOX WILL DISPLAY 0x1! I'M NOT RESPONSIBLE FOR ANY DAMAGED DEVICE!.
!!! Whatever you do, it is at your own risk !!!
Either for creating or removing a vendor partition, follow these steps:
1. Download the TWRP ZIP tool to your External SD card.
2. Boot to TWRP recovery, under Install, flash the ZIP file as any other ROM or MOD file to execute the tool.
3. Reboot to recovery again to ensure the changes are applied properly.
4. In some cases you will need to format the mother partition after adding or removing the vendor partition next to it.
CREATE A VENDOR PARTITION:
So far these are the available options:
Mother partition selection: system / userdata
Split position: Splitting from the end / start of the mother partition.
Vendor partition size: 512 / 915 MB
REMOVE THE VENDOR PARTITION:
Should a Vendor module already exists, Trebley offers to remove it, returning to a Non-Treble partition table. It will return the space to the mother partition, system or userdata. So, older non Treble ROMs could be flashed after the mandatory reboot.
DOWNLOAD
Trebley_APT_v1.0_ARM_20190215-signed.zip
SOURCES
All rights reserved to the project: Party and its creator(@Oki).
CAUTION
Currently, we recommend the use of Trebley, exclusively to developers, as until now there has been no development of material related to the project treble, this project lays the foundations creating the partition vendor, for the support treble.
CREDITS
@someone755 for the keycheck binary
@Zackptg5 for the V4A install script that inspired my version.
@Oki for the base script.
XDA:DevDB Information
[PARTITION][TREBLE] Project Treble for Samsung Galaxy S8 [dreamltexx][15.02.2019], Tool/Utility for the Samsung Galaxy S8
Contributors
DarioRetr
Source Code: https://forum.xda-developers.com/axon-7/development/tool-party-v0-1-vendor-partition-t3831517
Version Information
Status: Alpha
Current Stable Version: V1.0
Stable Release Date: 2019-02-26
Current Beta Version: V0.5
Beta Release Date: 2019-02-15
Created 2019-02-17
Last Updated 2019-02-17
thx the tools makes me now easyer to create and remove my treble partition since i used for the moment all time parted with console on pc. for the one that thinks that is treble. without right vendor partition is useless. i have a partition that boots gsi but with a nice glitched display
geiti94 said:
thx the tools makes me now easyer to create and remove my treble partition since i used for the moment all time parted with console on pc. for the one that thinks that is treble. without right vendor partition is useless. i have a partition that boots gsi but with a nice glitched display
Click to expand...
Click to collapse
It is certainly not Trebley's fault, as it was specified in red, that Trebley is currently recommended for use only to developers, as Trebley, lays the foundations for Project Treble by creating the Vendor partition, after which it will be up to the developers Compile from source the vendor. IMG, the TWRP custom, and the kernel, to allow the startup of Project Treble.
In addition, in layman's terms, Trebley currently creates the vendor partition, after which it will be you dev compile the sources by adjusting them to the treble standards, to allow you to use project treble on the Samsung S8.
Members are reminded that making changes to device partitions is inherently dangerous. With that in mind, exercise caution and if in doubt, DON'T.
LenAsh said:
Members are reminded that making changes to device partitions is inherently dangerous. With that in mind, exercise caution and if in doubt, DON'T.
Click to expand...
Click to collapse
Dear @LenAsh, Trebley, precisely ensures through the scripts, a greater security, as it is all automated and calculated to the milimeter, and above all reduces the risk. Clearly, currently Trebley for S8, it is in its initial state, where it introduces the vendor partition, now it's up to you have developer, compile and propagate the material needed to start project treble in our Samsung S8 device
Any hope on this zip working on s8 phones? Or porting for others?
Rehvix said:
Any hope on this zip working on s8 phones? Or porting for others?
Click to expand...
Click to collapse
This zip is made for the Samsung Galaxy S8, but also works on other devices, because the script is multi platform and arm, currently, but we recommend the use of the zip file to developers, because currently Trebley creates only the vendor partition, but Without the vendor file, and a modified TWRP for treble support, you still can't use the project treble. We need to wait for some dev, compile from source, the appropriate kernel for project treble, and a vendor appropriate to the project treble along with a custom TWRP, allowing the Samsung S8 to use the vendor partition created by Trebley, and finally use Project Treble.
so can we get aosp room sir..??
onMyConquest said:
so can we get aosp room sir..??
Click to expand...
Click to collapse
In order to run a GSI, you have to wait for the scene, wait for some Dev, compile the kernel and the vendor, and place a custom twrp, to allow the project treble to go. In practice Trebley, prepares the partition making it compatible with Project Treble. Now you have to have developer share software, clearly depends on scene to scene, to give you an example on the Samsung Galaxy S6 Edge, with the same method, now they can use the GSI, with project treble.
Plz someon try this. Im afraid to brick
https://www.xda-developers.com/flash-generic-system-image-project-treble-device/
Can somebody take this down or at least force the guy to rename it ? this is clearly a script that'll only make an empty partition, this is NOT treble as stated in the thread also by reading the messages it's clear the OP doesn't know what he's talking about
If I understand, in the case of Galaxy S8, it splits the /system partition to create a /vendor partition and copy the contents from /system/vendor to the new /vendor partition, right?
However, dont the binaries and/or drivers need to be adapted for project Treble? I mean how does the (lets say) new aosp rom know what drivers use for each feature?
Josevega said:
Can somebody take this down or at least force the guy to rename it ? this is clearly a script that'll only make an empty partition, this is NOT treble as stated in the thread also by reading the messages it's clear the OP doesn't know what he's talking about
Click to expand...
Click to collapse
My dear, create the partition to make it compatible with the Project Treble, now instead of talking about things, why do not you go to work, adapting the kernel and the vendor, and send the vendor.img, and the boot.img and twrp .img, to be able to use project treble?
Also before saying, that Trebley, does not know what he is talking about, he learns to read English, why it is written clearly is round, that this script is recommended to use you have developer to ensure project treble also on S8.
If then you want to talk bad, because evidently put project treble on S8, it requires too much work as you have to move the device tree blob and so on, and for question of laziness you want to deny the possibility of having treble to users.
So we know that the developers of the scene samsung S8, does not paste them to adapt the kernel to project treble.
bamsbamx said:
If I understand, in the case of Galaxy S8, it splits the /system partition to create a /vendor partition and copy the contents from /system/vendor to the new /vendor partition, right?
However, dont the binaries and/or drivers need to be adapted for project Treble? I mean how does the (lets say) new aosp rom know what drivers use for each feature?
Click to expand...
Click to collapse
Then, Trebley, takes part of partition either from system or userdata, and then creates a new partition named vendor, and makes the device compatible with project treble, then it needs a developer, move device tree blobs, and systems the configuration , because it is not enough to move the vendor into vendor, you have to compile the kernel so that you take the drivers from the vendor, you have to do some work first at the software level.
You need someone who has Ubuntu, take the device sources from GitHub, and run the device tree, and compile the vendor.img and boot.img which includes the kernel, and then edit the twrp to make it compatible with Treble, after that you can use treble on the device.
Trebley, did not want to compile the vendor for the Samsung S8 users, for one reason, because Trebley's developers are external to the Samsung S8 scene, and compile a kernel or vendor for an S8, as you might compile for an S7 Edge or an S6, it could cause users of the S8, slowdowns, battery that you download easily, GSI where the camera does not work.
So we prefer to be your developer of the scene, to compile the vendor and boot, to ensure reliability even with the project treble. Because we do not want s8 users to consider project treble as an unstable project.
In addition, this project has also expanded on Note 8, we will see who will be faster to adapt kernels and vendors.
Update 18/02/2019
A developer of the S7 Edge scene, he decided to contribute to the project, starting to work on the sources of the device.
https://github.com/KiubeDev
Hello ,Can you make this for s7 edge?
DarioRetr said:
In addition, this project has also expanded on Note 8, we will see who will be faster to adapt kernels and vendors.
Update 18/02/2019
A developer of the S7 Edge scene, he decided to contribute to the project, starting to work on the sources of the device.
https://github.com/KiubeDev
Click to expand...
Click to collapse
In this github account all the repositories are forked from ivan meler, he is galaxy s7/edge developer i can see a universal exynos 8895 repo but there is no device specific code for dream2ltexx and only a highly experienced developer can make this then there will be no need for treble support.
Why are u not using the preload partition???? Would be much easier as its only used for apps to be installed in stock Rom for a carrier or Region...
Can I install this, and then https://forum.xda-developers.com/pr...vice-development/lineage-phh-treble-t3767690?
Will that brick?
qasim799 said:
In this github account all the repositories are forked from ivan meler, he is galaxy s7/edge developer i can see a universal exynos 8895 repo but there is no device specific code for dream2ltexx and only a highly experienced developer can make this then there will be no need for treble support.
Click to expand...
Click to collapse
Dear, that repository is another, he is just a dev, the repository where they are working and gitlab, and is only accessible to developers.

Porting AOSP to custom-built device

Hi everyone,
as title suggests, I'd like to "port" clean AOSP to be able to install and run it on the custom device.
Basically, the situation is following: I got a custom device, based on rockchip rk3288 SoC. The device currently runs Android 5.1 successfully. I'd like to update Android to version 6 (got AOSP sources and AWS builder image up and running), but the company that created Android v5 for us no longer exists.
Thus I am here to ask for advice(s) on how to proceed (or whether it even is a good idea to do that myself, given the fact that I have zero experience with Android ROMs development), possibly a step-by-step guide on what to do.
The question is, do I just find drivers for hardware components present in the device (usb hub, ethernet, etc.) and just somehow "link" those to existing sources (of AOSP) and just run the build with different parameters? Or do I need to build a whole new kernel for the given device-OS combination?
Thank you for any advice or opinion!
Well this is an interesting one. There are several routes you can take here.
If you have the kernel source code, and the source code for the drivers, you could probably build the kernel from source and use it to boot Android, however, as that's unlikely, you're looking at a more regular porting process, which usually consists of pulling the vendor blobs from the existing Android system, building AOSP/Lineage with those blobs involved, and hacking together a new ramdisk that HOPEFULLY will be compatible. It's a very long and very tedious process, but it's certainly possible.
From that you'll then get in to the debugging stage of finding out what works out of the box, you'll very well need to make changes to AOSP for it to work on that SoC.
abtekk said:
Well this is an interesting one. There are several routes you can take here.
If you have the kernel source code, and the source code for the drivers, you could probably build the kernel from source and use it to boot Android, however, as that's unlikely, you're looking at a more regular porting process, which usually consists of pulling the vendor blobs from the existing Android system, building AOSP/Lineage with those blobs involved, and hacking together a new ramdisk that HOPEFULLY will be compatible. It's a very long and very tedious process, but it's certainly possible.
From that you'll then get in to the debugging stage of finding out what works out of the box, you'll very well need to make changes to AOSP for it to work on that SoC.
Click to expand...
Click to collapse
Thanks for pointing in the right (or at least some) direction! I found some guide on porting ROMs which I followed, basically like you said. So I just replaced some files in System image. Will flash later today, so maybe I will get some results!
abtekk said:
From that you'll then get in to the debugging stage of finding out what works out of the box, you'll very well need to make changes to AOSP for it to work on that SoC.
Click to expand...
Click to collapse
So I was following this tutorial, although found some irregularities, let's say: For example, none of those 2 folders contained init.d/ directory, thus I didn't update it. Also, I haven't found META-INF folder therefore haven't updated updater-script.
Basically, when I did (or at least what I think I was doing was that I took /system partition from our current ROM, that is working on that custom device and replaced stuff in there by stuff from the new system I wanted to port. My idea from what I've read was that i took kernel (and boot/recovery) from the original, working ROM and "injected" the new system onto it. Is that correct? Is that what I needed to do? Because the problem is, I cannot boot into the system (might as well be because of Kernel version, because I am trying to port Android 6 on Kernel 3.10. which was used in the current ROM running Android 5). It looks like the device is stuck in bootloader, or "somehow doesn't know what to start" (sorry, I can't put it better), displaying only my device's logo.
When I connect it to the computer via USB cable, running adb devices shows me that device, but when I try to access shell using adb shell I got error saying that /system/bin/sh wasn't found, which made me thinking that somehow the /system partition isn't "linked" properly, like I stated in the beginning.
Was I doing everything correctly? Do I need to do something above that? (maybe do you know about some tutorial). I am trying to port AOSP 6 Android.
Thank you!

Categories

Resources