[AOSP 8.1] [2019-03-06] Phh-Treble

Search This thread

phhusson

Recognized Developer
Jul 23, 2009
2,448
4,694
Paris
WARNING: You'll most probably loose ALL your data, and might break your phone. Please use with extreme caution!

The goal of this ROM is to provide full Treble-compatible hardware support, and nothing else.
This means that hardware which DON'T have Treble API won't be supported, like Essential's external camera.
No feature will be added. This will ease forward porting to new Android versions, which is the very goal of Project Treble :)

My hope is that other ROM developers will use this ROM as a basis to construct more advanced ROM.

For a list of supported devices, consult and fill https://github.com/phhusson/treble_experimentations/wiki

How to flash:
Follow instructions available at https://www.xda-developers.com/flash-generic-system-image-project-treble-device/

Changelog
v29 (2019-03-06):
- March security patch
- Fix MT6739 incoming SMS and mobile data

v27 (2019-01-08):
- January security patch
- arm32_binder64 variant
- Minor stuff

v25 (2018-09-07)
- September security patch
- [Mi 6X/Mi Pad 4] Fix backlight
- [Mi Mix 2S] Disable fingerprint button behaviour
- [Galaxy S9/Note 9]
- Fix (some) MTK incoming call
- Fix a2dp on some devices
- Fix boot on some devices

v23 (2018-08-07):
- August security patch
- Fixes tethering on some Qualcomm devices (Thanks @notsyncing)
- Enable Ambient Display for everyone
- Add an off-computer flasher (first step towards OTA)
- Fixes MTP
- Fixes fingerprint on Moto devices
- Change Huawei quick charge based on device (Thanks @Dil3mm4 )
- Fixes camera on Moto devices
- Fix notches height for some devices (Thanks @tadiT7)

v22 (2018-07-03):
- July security patches
- Fixes Samsung Galaxy S9 fingerprint enrollment
- Fix in-call audio for Pixel 2
- Disable night mode on some MTK for which it is very slow
- Fix wifi tethering on some configurations

v21 (2018-06-27):
- [OnePlus 6] Fix booting on A slot
- [OnePlus 6] Fix userdata filesystem size
- [OnePlus 6] Include a framework-res overlay (fixes auto backlight, improve battery-life, ...)
- Fix status bar height for notches on various devices (Thanks @tadiT7)
- [Samsung Galaxy S9 Qualcomm] Fix backlight
- Fix webview in Android Go variant
- Fix audio jack for some devices
- Fix H264 encoding on Huawei (Thanks @OldDroid)
- Fix backlight on some SDM845 devices (Xiaomi Mi Mix 2S, Xiaomi Mi8)

v20 (2018-06-07):
- June Android security patch level
- New experimental FLOSS variant (check sources for list of apps)
- [OnePlus6] Fixes backlight
- [OnePlus6] Partial support for DnD slider
- Fixes bug on some A/B devices where device would stop booting after several success

v19 (2018-06-03):
- Huawei fast charge (Thanks @flex1911 and @OldDroid)
- Fix MTK TrustKernel TEE (those devices will need to factory reset!)
- Support 32bits Android 8.0 devices
- Rewrite Security Patch Level for Android 8.1 devices, and A/B devices as well. Should fix boot for some devices.
- Enable GPU profiling on Huawei devices to fix UI glitches
- Fixed Modded Google Camera installation
- Use round icons
- Enable doze
- New Android Go variant
- On Huawei devices add "Swipe fingerprint for notifications" option
- Releases are now compressed with xz. Uncompress before flashing.

v18 (2018-05-14):
- Update to Android Security Patch level 2018-05-01
- Disable HW keystore on mediatek devices using trustedkernel, until it is fixed
- Re-enable Huawei navigation keys (Thanks @LuK1337 and OpenKirin team)
- Fixes android build version/security patch level (might lead to stuck on bootanimation some devices)
- Enable NightMode for everyone
- Enable automatic backlight with Huawei Mate 9 settings on Huawei devices
- Remove unnecessary warning on boot (if you still get it, it means it is useful, to tell me!)
- Include android.system.net.netd, fixes data connection for several Qualcomm devices

v17: (2018-04-24)
- Fixes multimedia from SDCard
- Fixes in-call audio for Qualcomm devices
- Fixes in-call earpiece/speaker for Foxconn/Qualcomm devices (Razer Phone, Sharp Aquos S2, ...)
- Fixes signal level for Huawei devices (Thanks to OpenKirin team)
- Fixes boot on some A-only devices (HTC U11+, Xperia XZ1 at least)
- Report vendor's security patch level instead of framework security patch level
- Fix fsck for f2fs (Thanks @flex1911 and @LuK1337)

v16: (2018-04-05)
- Fixes MTP access to sdcard
- v15 was missing graphical glitches fix. Applied it again.
- Resize /system to maximum size on first boot

v15: (2018-04-03)
- Update to 2018-04-01 security patches
- Fixes FAT sdcards
- Fixes some USB-C headphones on some devices
- Fix Essential PH-1 boot

v14: (2018-03-26)
- Fixes Galaxy S9(+) backlight control

v13: (2018-03-23)
- Disable Android's fake touches, which made unlocking hard
- Fixes Galaxy S9 boot and WiFi
- Make system.img back to 1.5GB
- Disable again adb auth, to help debugging

v12: (2018-03-05)
- Updated to security patch 2018-03-01
- Various stability, behind-the scene, changes
- Fixes camera on MTK devices
- Support ARM32 devices
- Supports HW button backlight

v11: (2018-02-20):
- Fixes bluetooth on Kirin 970 devices (Thanks @LuK1337)
- Fixes sdcard on Huawei devices
- Includes nfc-nci.conf, should fix NFC on some devices
- Show real Android version (Thanks @LuK1337)
- Enable ADB authentification

v10: (2018-02-18)
- Android 8.1 !
- Includes versioned vndk, so devices running both 8.1 and 8.0 should work

v9: (2018/01/15)
- Include the compositing fixes for Kirin 970
- Crude support for Huawei fingerprint gestures (click = home, left = back, right = voice assistant, up = quick settings, down = notifications, long press = recent apps)

v8: (2018/01/14)
- Huawei compositing fixes (fixes various graphical glitches)
- Various su SELinux fixes

v7: (2017/12/30)
- Fixes various regressions (APNs, A/B, vanilla, fingerprint ...)
- Fixes dev/input requirement (not useful to any real-life product yet, afaik)
- Fixes some not-installable applications from Play Store
- Fixed substratum in phh's superuser

v6: (2017/12/19)
- Major code clean-up. Please report regressions
- Fixes random reboot on Huawei devices
- Optionally includes SU (you need to install phh's SuperUser from F-Droid/Play Store)

v5: (2017/12/14)
- Fixes FDE decryption (SystemUI was crashing in loop)
- Use a real list of APNs
- Include Chrome and Gboard (fixes IME crash when trying to input a symbol)
- Fixes SEPolicy for Hardware Overlay Picker (should fix crash of Hardware Overlay Picker on startup)

v4: (2017/12/10)
- Fixes sdcard in MTP
- Fixes Dual-SIM
- Includes hardware-specific overlays:
- Enable 4G selection in networks
- Bigger status bar on Essential PH-1
- Enable navigation bar on HTC U11+

v3: (2017/12/04)
- Fixes sdcard in MTP build fail, so will be fixed in next release
- New variant including gapps

v2: (2017/11/26)
- Fix wifi tethering
- Fix F2FS userdata
- Fix sdcard
- Fix fingerprint (Huawei)

Download:
https://github.com/phhusson/treble_experimentations/releases/download/v29

Want to chat about this project? Go to Freenode IRC, #phh-treble.
IRC: irc://irc.freenode.net/#phh-treble
WebIRC: http://webchat.freenode.net/?channels=#phh-treble&uio=d4
Matrix: #freenode_#phh-treble:matrix.org

Other chatrooms:
Telegram https://t.me/phhtreble

Thanks @MishaalRahman and @Exelios for the huge kickstart help

Thanks to all my donators:
- @Exelios

- @fargonaz
- @VictorM86
- @howdid
- @heatfire
- @ohwarumbloss
- @RexGoogolplex
- @abhas.abhia
- @Emoclaw
- @Sebianoti
- @DocRambone
- @egandt
- @Blackbird1997
- @Burakki
- @josdehaes
- @TheUndertaker21

Thanks to the following companies:
- Huawei, for a Huawei View 10
- Blackview, for a Blackview A20

PS: Yes the name sucks, but I'm clueless about a name
 
Last edited:

phhusson

Recognized Developer
Jul 23, 2009
2,448
4,694
Paris
How to know if your phone is supported:

- Does your OEM provides a stock Oreo ROM?
No ===> Your phone is not supported
- Run Treble Check on stock Oreo ROM. Does it say Treble is supported?
No ===> Your phone is not supported

If all answers are yes, then your phone MIGHT be supported.
Test it, and report the result!
 
Last edited:

phhusson

Recognized Developer
Jul 23, 2009
2,448
4,694
Paris
Build script available at https://github.com/phhusson/treble_experimentations/blob/master/build.sh

Current status:

Over-all:

Xperia XZ1:
- Broken camera (because of Sony's DRM)

Huawei Mate 9 Pro and Honor 9:
- Fingerprint sensor should have "home" behaviour
- software keys should be disabled

Known end-user problems (WON'T BE FIXED in this ROM):
- No exfat
 
Last edited:

phhusson

Recognized Developer
Jul 23, 2009
2,448
4,694
Paris
Known mess:
- A-only should use https://android-review.googlesource.com/q/hashtag:"non-ab-boot-gsi"+(status:open OR status:merged) instead of dm-verity hacks
- the dm-verity work-around is also needed on A/B, so other patches are missing, for some other reason
- On A/B devices, this system.img effectively transforms the device into a userdebug build. This means adb root works!
adb root should work on A-only later too, though it requires that the OEM includes https://android-review.googlesource.com/q/topic:move-adbd-to-system+(status:open+OR+status:merged)
This can probably be worked-around by moving adbd inside a /system/etc/init/xxx.rc
- ADB auth is totally disabled at the moment on A/B, this is bad, but useful for debugging.
- Huawei (for instance Mate 9) doesn't declare android.hardware.fingerprint. This ROM does it for them, but this need to be better implemented
- SuperSU and Magisk screws with SELinux policy. DO NOT USE SuperSU OR Magisk WITH THIS ROM
 
Last edited:

Swan Princess

Senior Member
Mar 6, 2017
176
37
32
Moscow
Wonderful work you're doing here! Would you mind explaining what is the A/B only versions? What do those letters mean? Are there means of reverting back from your experimental build to stock Oreo?
 

IH8TouchWiz

Senior Member
Nov 16, 2017
81
74
Wonderful work you're doing here! Would you mind explaining what is the A/B only versions? What do those letters mean? Are there means of reverting back from your experimental build to stock Oreo?
A/B refers to the new partitioning system on the Pixel and Essential devices. It has one active slot and a backup slot for all parts of the system, so you'll have a boot_a and boot_b, system_a and system_b, and so on. Most devices still use a singular slot system, so unless you have a pixel or essential phone, you would flash the normal O build. Also, the steps on how to flashing back to stock are usually device specific, but you should be able to restore your stock O build by just reflashing the stock system.IMG from your device and wiping in fastboot.
 
Last edited:
  • Like
Reactions: Dvalin21

Swan Princess

Senior Member
Mar 6, 2017
176
37
32
Moscow
A/B refers to the new partitioning system on the Pixel and Essential devices. It has one active slot and a backup slot for all parts of the system, so you'll have a boot_a and boot_b, system_a and system_b, and so on. Most devices still use a singular slot system, so unless you have a pixel or essential phone, you would flash the normal O build. Also, the steps on how to flashing back to stock are usually device specific, but you should be able to restore your stock O build by just reflashing the stock system.IMG from your device and wiping in fastboot.

Oh, thank you for explaining that to me! I have a Mate 9 and I seem to enjoy living on the bleeding edge, at the same time I'm dependent on WiFi tethering for my net. So may try it and see how it works at least. Would love to see if we get any opportunities to fiddle with the camera processing and GPS subsystems, as those are my hobbies.
 

phhusson

Recognized Developer
Jul 23, 2009
2,448
4,694
Paris
Wonderful work you're doing here! Would you mind explaining what is the A/B only versions? What do those letters mean? Are there means of reverting back from your experimental build to stock Oreo?

Well A/B is the new partitioning scheme where all firmware partition exist twice, and the bootloader switches from one to the other when updating. This is also called seamless updates.

To revert back to stock... Well flash stock? :p
 

haky 86

Recognized Contributor
  • Oct 5, 2012
    3,446
    7,480
    Hama (Syria)
    interesting project, I've a question..are there any chance to run this project on device like P8 Lite 2015 (Kirin620) and P8 Lite 2017 (kirin655) since both are arm64? and also System A/B must be enabled on that device? thanks in advance
     
    • Like
    Reactions: xingyunjohn1

    PresidentMcCain

    Senior Member
    Jun 30, 2011
    383
    175
    interesting project, I've a question..are there any chance to run this project on device like P8 Lite 2015 (Kirin620) and P8 Lite 2017 (kirin655) since both are arm64? and also System A/B must be enabled on that device? thanks in advance

    Unless they are officially updated to Oreo and supports Treble (very unlikely), then no.
     

    Top Liked Posts

    • There are no posts matching your filters.
    • 437
      WARNING: You'll most probably loose ALL your data, and might break your phone. Please use with extreme caution!

      The goal of this ROM is to provide full Treble-compatible hardware support, and nothing else.
      This means that hardware which DON'T have Treble API won't be supported, like Essential's external camera.
      No feature will be added. This will ease forward porting to new Android versions, which is the very goal of Project Treble :)

      My hope is that other ROM developers will use this ROM as a basis to construct more advanced ROM.

      For a list of supported devices, consult and fill https://github.com/phhusson/treble_experimentations/wiki

      How to flash:
      Follow instructions available at https://www.xda-developers.com/flash-generic-system-image-project-treble-device/

      Changelog
      v29 (2019-03-06):
      - March security patch
      - Fix MT6739 incoming SMS and mobile data

      v27 (2019-01-08):
      - January security patch
      - arm32_binder64 variant
      - Minor stuff

      v25 (2018-09-07)
      - September security patch
      - [Mi 6X/Mi Pad 4] Fix backlight
      - [Mi Mix 2S] Disable fingerprint button behaviour
      - [Galaxy S9/Note 9]
      - Fix (some) MTK incoming call
      - Fix a2dp on some devices
      - Fix boot on some devices

      v23 (2018-08-07):
      - August security patch
      - Fixes tethering on some Qualcomm devices (Thanks @notsyncing)
      - Enable Ambient Display for everyone
      - Add an off-computer flasher (first step towards OTA)
      - Fixes MTP
      - Fixes fingerprint on Moto devices
      - Change Huawei quick charge based on device (Thanks @Dil3mm4 )
      - Fixes camera on Moto devices
      - Fix notches height for some devices (Thanks @tadiT7)

      v22 (2018-07-03):
      - July security patches
      - Fixes Samsung Galaxy S9 fingerprint enrollment
      - Fix in-call audio for Pixel 2
      - Disable night mode on some MTK for which it is very slow
      - Fix wifi tethering on some configurations

      v21 (2018-06-27):
      - [OnePlus 6] Fix booting on A slot
      - [OnePlus 6] Fix userdata filesystem size
      - [OnePlus 6] Include a framework-res overlay (fixes auto backlight, improve battery-life, ...)
      - Fix status bar height for notches on various devices (Thanks @tadiT7)
      - [Samsung Galaxy S9 Qualcomm] Fix backlight
      - Fix webview in Android Go variant
      - Fix audio jack for some devices
      - Fix H264 encoding on Huawei (Thanks @OldDroid)
      - Fix backlight on some SDM845 devices (Xiaomi Mi Mix 2S, Xiaomi Mi8)

      v20 (2018-06-07):
      - June Android security patch level
      - New experimental FLOSS variant (check sources for list of apps)
      - [OnePlus6] Fixes backlight
      - [OnePlus6] Partial support for DnD slider
      - Fixes bug on some A/B devices where device would stop booting after several success

      v19 (2018-06-03):
      - Huawei fast charge (Thanks @flex1911 and @OldDroid)
      - Fix MTK TrustKernel TEE (those devices will need to factory reset!)
      - Support 32bits Android 8.0 devices
      - Rewrite Security Patch Level for Android 8.1 devices, and A/B devices as well. Should fix boot for some devices.
      - Enable GPU profiling on Huawei devices to fix UI glitches
      - Fixed Modded Google Camera installation
      - Use round icons
      - Enable doze
      - New Android Go variant
      - On Huawei devices add "Swipe fingerprint for notifications" option
      - Releases are now compressed with xz. Uncompress before flashing.

      v18 (2018-05-14):
      - Update to Android Security Patch level 2018-05-01
      - Disable HW keystore on mediatek devices using trustedkernel, until it is fixed
      - Re-enable Huawei navigation keys (Thanks @LuK1337 and OpenKirin team)
      - Fixes android build version/security patch level (might lead to stuck on bootanimation some devices)
      - Enable NightMode for everyone
      - Enable automatic backlight with Huawei Mate 9 settings on Huawei devices
      - Remove unnecessary warning on boot (if you still get it, it means it is useful, to tell me!)
      - Include android.system.net.netd, fixes data connection for several Qualcomm devices

      v17: (2018-04-24)
      - Fixes multimedia from SDCard
      - Fixes in-call audio for Qualcomm devices
      - Fixes in-call earpiece/speaker for Foxconn/Qualcomm devices (Razer Phone, Sharp Aquos S2, ...)
      - Fixes signal level for Huawei devices (Thanks to OpenKirin team)
      - Fixes boot on some A-only devices (HTC U11+, Xperia XZ1 at least)
      - Report vendor's security patch level instead of framework security patch level
      - Fix fsck for f2fs (Thanks @flex1911 and @LuK1337)

      v16: (2018-04-05)
      - Fixes MTP access to sdcard
      - v15 was missing graphical glitches fix. Applied it again.
      - Resize /system to maximum size on first boot

      v15: (2018-04-03)
      - Update to 2018-04-01 security patches
      - Fixes FAT sdcards
      - Fixes some USB-C headphones on some devices
      - Fix Essential PH-1 boot

      v14: (2018-03-26)
      - Fixes Galaxy S9(+) backlight control

      v13: (2018-03-23)
      - Disable Android's fake touches, which made unlocking hard
      - Fixes Galaxy S9 boot and WiFi
      - Make system.img back to 1.5GB
      - Disable again adb auth, to help debugging

      v12: (2018-03-05)
      - Updated to security patch 2018-03-01
      - Various stability, behind-the scene, changes
      - Fixes camera on MTK devices
      - Support ARM32 devices
      - Supports HW button backlight

      v11: (2018-02-20):
      - Fixes bluetooth on Kirin 970 devices (Thanks @LuK1337)
      - Fixes sdcard on Huawei devices
      - Includes nfc-nci.conf, should fix NFC on some devices
      - Show real Android version (Thanks @LuK1337)
      - Enable ADB authentification

      v10: (2018-02-18)
      - Android 8.1 !
      - Includes versioned vndk, so devices running both 8.1 and 8.0 should work

      v9: (2018/01/15)
      - Include the compositing fixes for Kirin 970
      - Crude support for Huawei fingerprint gestures (click = home, left = back, right = voice assistant, up = quick settings, down = notifications, long press = recent apps)

      v8: (2018/01/14)
      - Huawei compositing fixes (fixes various graphical glitches)
      - Various su SELinux fixes

      v7: (2017/12/30)
      - Fixes various regressions (APNs, A/B, vanilla, fingerprint ...)
      - Fixes dev/input requirement (not useful to any real-life product yet, afaik)
      - Fixes some not-installable applications from Play Store
      - Fixed substratum in phh's superuser

      v6: (2017/12/19)
      - Major code clean-up. Please report regressions
      - Fixes random reboot on Huawei devices
      - Optionally includes SU (you need to install phh's SuperUser from F-Droid/Play Store)

      v5: (2017/12/14)
      - Fixes FDE decryption (SystemUI was crashing in loop)
      - Use a real list of APNs
      - Include Chrome and Gboard (fixes IME crash when trying to input a symbol)
      - Fixes SEPolicy for Hardware Overlay Picker (should fix crash of Hardware Overlay Picker on startup)

      v4: (2017/12/10)
      - Fixes sdcard in MTP
      - Fixes Dual-SIM
      - Includes hardware-specific overlays:
      - Enable 4G selection in networks
      - Bigger status bar on Essential PH-1
      - Enable navigation bar on HTC U11+

      v3: (2017/12/04)
      - Fixes sdcard in MTP build fail, so will be fixed in next release
      - New variant including gapps

      v2: (2017/11/26)
      - Fix wifi tethering
      - Fix F2FS userdata
      - Fix sdcard
      - Fix fingerprint (Huawei)

      Download:
      https://github.com/phhusson/treble_experimentations/releases/download/v29

      Want to chat about this project? Go to Freenode IRC, #phh-treble.
      IRC: irc://irc.freenode.net/#phh-treble
      WebIRC: http://webchat.freenode.net/?channels=#phh-treble&uio=d4
      Matrix: #freenode_#phh-treble:matrix.org

      Other chatrooms:
      Telegram https://t.me/phhtreble

      Thanks @MishaalRahman and @Exelios for the huge kickstart help

      Thanks to all my donators:
      - @Exelios

      - @fargonaz
      - @VictorM86
      - @howdid
      - @heatfire
      - @ohwarumbloss
      - @RexGoogolplex
      - @abhas.abhia
      - @Emoclaw
      - @Sebianoti
      - @DocRambone
      - @egandt
      - @Blackbird1997
      - @Burakki
      - @josdehaes
      - @TheUndertaker21

      Thanks to the following companies:
      - Huawei, for a Huawei View 10
      - Blackview, for a Blackview A20

      PS: Yes the name sucks, but I'm clueless about a name
      114
      How to know if your phone is supported:

      - Does your OEM provides a stock Oreo ROM?
      No ===> Your phone is not supported
      - Run Treble Check on stock Oreo ROM. Does it say Treble is supported?
      No ===> Your phone is not supported

      If all answers are yes, then your phone MIGHT be supported.
      Test it, and report the result!
      76
      Build script available at https://github.com/phhusson/treble_experimentations/blob/master/build.sh

      Current status:

      Over-all:

      Xperia XZ1:
      - Broken camera (because of Sony's DRM)

      Huawei Mate 9 Pro and Honor 9:
      - Fingerprint sensor should have "home" behaviour
      - software keys should be disabled

      Known end-user problems (WON'T BE FIXED in this ROM):
      - No exfat
      70
      Known mess:
      - A-only should use https://android-review.googlesource.com/q/hashtag:"non-ab-boot-gsi"+(status:open OR status:merged) instead of dm-verity hacks
      - the dm-verity work-around is also needed on A/B, so other patches are missing, for some other reason
      - On A/B devices, this system.img effectively transforms the device into a userdebug build. This means adb root works!
      adb root should work on A-only later too, though it requires that the OEM includes https://android-review.googlesource.com/q/topic:move-adbd-to-system+(status:open+OR+status:merged)
      This can probably be worked-around by moving adbd inside a /system/etc/init/xxx.rc
      - ADB auth is totally disabled at the moment on A/B, this is bad, but useful for debugging.
      - Huawei (for instance Mate 9) doesn't declare android.hardware.fingerprint. This ROM does it for them, but this need to be better implemented
      - SuperSU and Magisk screws with SELinux policy. DO NOT USE SuperSU OR Magisk WITH THIS ROM
      31
      There, I released my first Android 8.1 version.
      Overall, I consider it less stable than 8.0, but I think it should be usable.

      For the known limitations:
      - On MTK, camera doesn't work
      - On Huawei, I could get Huawei stock app to run

      And Download manager is still broken, so you still have to kill play store every time you want to download an app...

      Dirty flash should work, but I barely tested it.

      It took me a lot of effort, so please enjoy :)