19
Haxk20
1y

Porting 8.1 to old device is really pain but thats nothing compared to whats to come.
Google annouced Project Treble and it does that vendor shit is on partition and init files are edited to make them load. Then you can run GSI (Generic System Image). When it was released all developers said that its impossible to bring support for it unofficialy. Then some guys on XDA ported it to Xiaomi phone. Great they proved almost entire XDA wrong. Great. Then few phones did the same. Amazing. Now almost any phone with good dev can be trebelized. Great. Well the device needs 400MB+ partition that is unused so that we can add vendor files there. Well its issue on my phone since i dont have that big unused partition. FUCK. Well i have 11.1GB Virtual SDcard partition. Hmmmm maybe i can resize that partition and create new partition of size 500MB to make it as vendor. OK great. Once thats solved then just copy them and done. WRONGGGGGGGGGGGGG. Its not that easy. First you need to make a script that places all device releated shit into vendor. OK thats easy. Then comes the hard part. Those vendor files have no fucking clue they are in not in system folder. So they start loading shit and ofcourse they will fail if they are not in system. Well most users think we are done thats its over. Its not. HEX editing comes to the rescue. You edit every single blob to make it compatible with vendor partition. OK after that hell pain you are almost done. Just edit init files and try GSI. It will probably fail to boot. Now you search logs for missing crap and slowly add that until it boots.

So this is ahead of me since i dont have 8.1 support yet. But once its done then im coming for you treble. Ohhhhhh how cool would it be to run android P on Xperia P ?

Sure you can skip treble porting but its better if you do it since it makes porting new android version soooooooo much easier.

Comments
  • 3
    Thanks for this nibble of knowledge ^^ and yeah being able to backport Android P to devices whenever its source code gets published would be amazing :D
  • 1
    @Condor That is just simplified sadly. The full shit is much harder. Here is list of few commits on those xiaomi phones and that doesnt include blob editing still: https://review.lineageos.org/q/...
  • 1
    @Condor Also android P is not amazing its just HEAVEN. Android 8.1 ported to this phone will be amazing. I ported 6.0 just month ago and im already trying 8.1. Yes its pain.
  • 1
    @Condor Also i cant seem to understand nibble of knowledge. What does it mean ?
  • 3
    @Haxk20 When it involves hex editing, it sure as hell has to be.. I'm still a noob with Android development and porting - just gonna try to compile a custom kernel for this thing first and see where it gets me, but yeah the full Android porting process sounds pretty difficult. Hopefully this Project Treble can solve some of the issues that manufacturers and OEM's still impose on the update process, and make building custom Android ROM's for devices easier. Not sure if it would be able to take care of the nondisclosure of kernel source though? It's a major issue on that tablet of mine. Even after explicitly asking Medion, those tech support chaps still adamantly refused to provide the goddamn sauce -.-
  • 3
    @Haxk20 A nibble is half a byte.. tasty indeed! :P
  • 1
    @Condor Ahhhh i see. So just a small byte. OK Well kernel source issue is on OEM to fix. They should release those god damn sources if they build android. But well they dont because almost nobody uses them. Issue is that we can compile AOSP version of that same android which is great but cant go any higher because every version adds something to kernel. And since we have only precompiled kernel we cant do shit. But OEM upon asking should give you the sources. If they dont you may contact lawyer which trust me will make them release those sources because they broke GNU and well they can then block them from producing any more devices.
  • 1
    @Condor And if you asked them then take some legal stuff from your sleve and they should provide that source. If they dont then well thats fucked up. Maybe you can sue them. I have the same issue with prestigio tablet. Going to ask for sources but i doubt they will give them to me.
  • 3
    @Haxk20 legal pressure could help yes. Most manufacturers and especially their tech support probably don't know jack shit about kernels and open source licenses.. I used to have a contact email for Medion but lost it when I wrecked my first mail server (which at the time ran CentOS 6.. shit OS, don't bother). And since I didn't have backups I lost it. Now all they provide is some stupid contact form which requires all kinds of shit like phone number, address, store I bought it at, serial number, date of purchase etc. Probably it's still in the warranty period so they should respond, but it makes the whole contact process much less robust. On email I could at least ask delivery and read receipts...

    Anyway.. first thing is reaching Medion to begin with (and gobble up all my data for those mofos), but getting the issue escalated to their actual engineers has been quite difficult.. pretentious little bastards those tech support chaps are -.-
  • 3
    So yeah, I hope that I'll get the source code and then I can modify that tablet too.. but I don't have high hopes for it :/
  • 1
    @xzvf thanks
Your Job Suck?
Get a Better Job
Add Comment