Manually install Project Treble? - OnePlus 5T Questions & Answers

Since Project Treble isn't coming officially, isn't it possible to just partition the phone manually using an unlocked bootloader, custom recovery, and other such tools, to then make the phone repartitioned in a way that supports Treble?

I'm not a developer but repartitioning the phone would be very tricky as it might also brick your device. OnePlus said this in their post about Trebble. This is assuming you do it via an OTA update, plugging in the phone to a computer might decrease the risk of bricking.
Again, I'm not a developer and don't have a lot of experience so someone else more experienced might pitch in and give their thoughts about this.

I had the same idea of manually installing project treble, I would really love to know if it's possible

I think our biggest hope is that LineageOS will maybe support it. But one thing is sure. If you stay on OOS even if you repartition your phone will not use treble as the OS will not even try to do that. It will work the same regardless of the extra partition.

Are the lineageOS developers working on supporting project treble ?

I may be wrong, but as far as I know, this is not really possible.
Getting project treble on your phone would imply that your firmware and OEM framework is compatible with this.
To give you an analogy, consider a PC running some version of Windows (since that's easier to explain). When a new version of windows is available, you don't have to upgrade firmware for your motherboard, your hard drive, sound card etc. This is because windows (or you yourself) will install the drivers necessary to communicate with your hardware.
This is possible because all OEMs subscribe to a certain contract.
Currently, Android ties in heavily to the device firmware, as the OEMs have to update their framework with each new iteration of Android. This is because until now, there was no exact contract defined for OEMs to subscribe to.
HAL and Treble are a step in the right direction to change this, but this cannot happen unless the OEMs rewrite the device framework to adhere to this new model or if someone invests their own time into doing so, if that is even possible.
Im not an Android developer, so I'm not right in all the points I've mentioned, but I've tried to clarify to the best of my own understanding.

Related

Wild speculation

I don't have the experience to know if this is possible, which is why I ask because I'm curious. I post here because I want devs to see it, and think "that could work" or "idiot"
As we know the defy bootloader will probably never be unlocked, now I was thinking would it not be possible to somehow isolate the bootloader from a rom, and run some kind of virtual one in a seperate partition to run a fully custom kernel? It's probably crazy but I'm dying to know what people think, don't be too hard on me I have no coding experience :/ however all opinions are welcome I think anything is possible
Sent from the real world by hacking into the matrix
I don't want that this will become another dead Bootloader-Hacking-Thread but I want to give you an answer with the facts:
1) There currently is no known way to execute code before booting the kernel because everything is well protected though signing code.
2) The only way to boot a kernel after kernel-boot are tools like kexec or 2ndboot. But a phone's RIL is a heavy stone on that way because it's not that easy to reinitialize this part of hardware and without RIL a phone is useless. The main-developers canceled this project due to this reason.
Other "non-phone"-devices with locked bootloader (like Sony's google-tv) are using this method without problems.
3) You can use kexec/2ndboot to load a full bootloader instead of an kernel only, too. But because we don't have the source we would have to reverse engineer it to disable the signature check of the kernel otherwise you would load another useless protected bootloader This was also an project but I don't think it's still alive...
Additional note: You can't directly flash a modified bootloader because our chipset has built-in OMAP3-security features. This means the CPU will only boot signed Code from NAND.
You can find many helpful information about this topic on this page:
http://and-developers.com/partitions:cdt#cdt_table_of_droid_x
Thanks that clarifies things quite a bit, however I mean loading not just a second kernel but a WHOLE bootloader that would handle the phones entire functions independently, or is it completely hardwired so its impossible for something to override it? (Sorry if you have already answered in the above). Another thing, has noone tried to compile custom fixed sbf? Maybe the bootloader could be replaced that way? In software almost anything done can be undone in some way, although perhaps this is the rare case where it isn't
Sent from the real world by hacking into the matrix
I edited my post to have everything at one place.
I hope this answers your questions.
The bootloader is like the bios in a pc (actually is part of the bios), it's what initializes the device and loads the rest of the code. to load it again or another one you had to reinitialize the device. the issue with the RIL is that when reset or restarted it "panics" and resets the whole device (I think, read it somewhere).
also the second unlocked bootloader that you want to load does not exist anyway.
it's better to just help the developers with bug reports and testing than daydream.
sorry mate!
m11kkaa said:
I edited my post to have everything at one place.
I hope this answers your questions.
Click to expand...
Click to collapse
So its all been tried before, damn! XD at least the devs here have done a fine job of making good roms even with this limitation, guess I will do my research before I buy my next phone as I love playing with roms, the more custom, the better
Sent from the real world by hacking into the matrix

I would like a more private and secure OS for my phone. But I'm a little lost.

Hello there,
I would like a more secure and private OS on my phone. Copperhead OS is interesting but I don't have the money to buy a device from them nor the know how to use the source. So my question, what is a good alternative. It seems like there are a lot of options here on XDA. It's my first time here and I'm not the most technical when it comes to software. I was able to switch all my home computing to linux/tails but working with my phone seems much harder. Any advice would be a huge help at this point.
What I think I know:
-I need to unlock my phone, and I have a Verizon Pixel XL. I found this article, (turns out new people can't post links but it is the page with the depixel8 tool), that I think will help me to unlock. Step one of this article mentions fastboot and adb which I think I get from Android SDK. So I'm pretty sure I first download the SDK (gonna find a guide to be safe) and then I do these steps through the terminal.
-Back up everything! I've removed all my pictures, I don't have a ton of contacts but I saved those else where too. Everything at this point can be lost, so when we say "back up everything" is there something I am missing? In my Desktop experience this also meant back up my old windows install, is this the case here? If so how do I do that?
-When the phone is unlocked, I then load a ROM on to it and select it in bootloader?
In summation, very lost, slightly confused, willing to learn! I'm just looking for an OS where I can use open source software, including the OS. Call me paranoid (fixes tin foil hat) but I'd rather try to keep my life private if even a little. Thank you for any help you can provide me in taking my first steps into something new.
If you are already on latest Verizon there is no way to unlock.
So no way to flash any custom roms.
But if security is what you want an unlock bootloader is just the other way. Less security.
Darn, I am on the latest version. I'm not able to unlock using the depixel8 tool? If that's the case I may just pick up a nexus and try to use Copperhead.
Lost And Confused said:
Darn, I am on the latest version. I'm not able to unlock using the depixel8 tool? If that's the case I may just pick up a nexus and try to use Copperhead.
Click to expand...
Click to collapse
If you're past 7.1 then sadly depixel8 won't work
Guess that's a done deal then. Instead of making a new thread I guess I'll just ask here. The way I understand it, Android is open source, but that doesn't mean the OS on my phone is open source. Seeing that the community here works with Android so much, are there any major privacy concerns running the latest version. As an example, Windows, especially Windows 10 is a privacy nightmare. I can't imagine Android is that bad, but what can you tell me?

Advice from Sony-experts

I just have been at a local store, had this phone in my hands and I have to admit, that this phone could be the perfect phone for me. I love the dimensions. My only problem: on my previous phones I always had full access to my phone (root et al), and this seems to be a real problem with sony phones in general. Unlocking the bootloader is difficult, and if you succeed, this might break your hardware (camera, as this is the case with Sony xz1 compact).
I'd need access mainly to extend the phone's lifetime, using custom roms when the device is not supported by the manufacturer any more. (I have high hopes that updates are easier since oreo.) So my question: This would be my first Sony. What do you expect in this regards?
That at least for two years, you'll have top notch official updates.
By that, fixes for it, like happened for previous xperias, are likely to pop out camera just degrade in quality btw it doesn't break completely)
As for extending functionalities, I hate to admit it, but modern android really.
Even freaking betterbatterystats can be granted all the required system permissions with.
Same for shimming applications with virtualxposed.
Well, if you are only using root and custom ROMs after support has ended, you do not have to worry about that for the next two years (maybe three considering security updates). Sony is in the Top3 Android-Manufacturers then it comes to Softwaresupport.
So, after two years you won't have any problems using an AOSP ROM. Thanks to project treble you could already use such a ROM right now. And with the ported Google Camera APP (which will be working on the new Snapdragon 845 shortly) you will not have to compromise Photoquality when switching to a Custom ROM.
To sum up: You don't have to worry for the next two years and you will be able to use this phone for a long period of time thanks to project treble and GCam.
PS: you do not break the actual hardware by unlocking the bootloader, you simply lose some sony-softwarefeatures, which can be replaced most of the times. At least that's how it's been on Sony Flagships in the past years.
Marvinho+ said:
Thanks to project treble you could already use such a ROM right now.
Click to expand...
Click to collapse
Really? Please post where that rom is, and how to use project treble to install it?
Here is one of those ROMs: https://forum.xda-developers.com/pr...-development/experimental-phh-treble-t3709659
I suggest you to do a search for project treble here on xda. There are several articles and threads to learn more about it.
I do not own a treble enabled device myself, so I don't know exactly how it all works.
Unlocking the bootloader isn't hard, even a noob can do it with ease. Sony is one of few manufacturers that actually supports it natively from their website. But, as you said there are some downsides to it. The DRM-keys will be lost forever, unless you back it up (which you can only do with temp root). But if you going to use a custom rom, there's no need for them anyway.
I'm not sure what loosing the DRM-keys will do with the XZ2 Compact. But with previous models some stuff stopped working, like the image processor. The camera worked, but with a slight impact on pictures taken in low light (probably have to do with image processor).
Marvinho+ said:
Here is one of those ROMs: https://forum.xda-developers.com/pr...-development/experimental-phh-treble-t3709659
I suggest you to do a search for project treble here on xda. There are several articles and threads to learn more about it.
I do not own a treble enabled device myself, so I don't know exactly how it all works.
Click to expand...
Click to collapse
no custom recovery for this phone yet, so not sure how you can flash a custom rom on it
Via fastboot. At least thats what it says in the instructions, when no custom recovery is available.
I told you to read more about treble and you didn't even read the instructions? I'm not gonna flash the ROM for you.
So to make things clear: I think you could flash a treble ROM like lineage OS et al. but I wouldn't recommend it to you.
Because:
-you would lose your DRM keys. There is no way to back them up yet and no DRM fix, yet.
-Gcam is not working properly an the sd845 yet.
Just wait two months and it will be whole other situation with this phone.
Are you this disappointed with the Sony firmware, that you want to flash another ROM already?
flashing a rom via fastboot is not what I would consider a safe thing to do, and, if you have a disaster doing it, then without a custom recovery there might be a problem getting back to where you were.
I'll wait to flash anything until there is actually something worth flashing, since the Sony stock firmware is pretty good right out of the box

Dumb Question? What is Treble?

Sorry, if this is a totally stupid question....new to 5T
So from what I understand it allows your phone to update to the latest version of android without the things traditionally needed to do so. And I'm positive that I'm either over simplifying it or am way wrong. Someone correct me if I'm wrong please...
The way I've been explaining it to people who are new to it is it is a separate partition where "drivers" specific for the phone are stored. This way the phones OS can be more generic and easily updated. As everything that is unique for the phone is stored on that partition.
That's not entirely how it works, when I get asked by non tech people that's kind of how put it. The idea was to separate the OS and the HAL to make it easier to update. The whole goal is to actually be able to roll out update to devices on a regular basis by making it easier. (At least that's what I would assume)

Bootloader modification

Does anybody have any information about how to modify the HBOOT image, or installing an entirely different boot image (e.g. Das U-Boot) onto this device? Or on any device? I've searched various forums for posts regarding HBOOT but not finding any regarding this.
I recently found my G2 (and G1!) buried in storage. I'd forgotten how much I enjoyed using them, especially the G2. I did the root thing, installing TWRP and a KitKat-based ROM, but it is terribly slow, not least of which for its reported 384M usable RAM.
I like to think I've got a pretty good idea as to how Android devices (generally) boot up, and was thinking I've got a fair amount of practice under my belt building my own Linux kernels, and how I'd really like a Raspberry Pi (or variant), but this device already has everything I'd need for a "SBC"-style device.
If I could slap Das U-Boot on there, I think it'd be pretty easy to (try to) boot a Linux kernel and shell and then figure out laboriously what to do for hardware drivers. (For that matter, what's the G2's capability re: USB OTG?) If it's a matter of making actual changes to HBOOT to tell it to load something other than Android (or kernel followed by Android), I'd be fine with researching that and then doing the laborious building an optimized kernel and drivers.
I could also be talking out my ass and have not, in fact, really understood the Android booting process. But I need a project and it would be really cool if I could work on this, I just don't really know where to look beyond what I've read. I did read one sequence where somebody reported on how they actually did a dual-boot Debian/Android setup (literal dual-boot, not a Debian chroot, which involved him modding the boot image for his LG Optimus). I haven't had time to follow through with it to be sure I can apply any of his findings to HBOOT, but I suppose that might be the best place to start.
One other thing -- if I modify HBOOT and break something, is that a brick, or can I arbitrarily swap out boot images even if they don't work? Or, more directly, will I have a means to re-burn the original image even if I were to completely wipe it? Will fastboot or adb recognize the device and be able to communicate with its filesystem? Not that I'm worried too much about bricking it, but it'd be nice to minimize that chance before I just bite the bullet and try another boot image and cross my fingers.
Hi @dwkindig,
You don't need to install a bootloader other than HBOOT to install non-Android software. For instance, I have recently ported postmarketOS to the HTC Desire Z. So if you need a project to work on, check it out. There are a lot of things you could help out with .

Categories

Resources