yashsingh1/xdaforums huggingface dataset:
[Android Q&A, Help & Troubleshooting] NiceDone:
I did successfully root the phone with instructions on page 11, and I used the same modified fastboot files and the adb that I downloaded then. Might these be the reason for error, or is the .img file somehow faulty?

PS. I'm noob so sorry if I can't figure out simple errors.
[Android Q&A, Help & Troubleshooting] dferreira:
That’s good 👍
[Android Q&A, Help & Troubleshooting] dferreira:
Now call “fastboot reboot”
[Android Q&A, Help & Troubleshooting] dferreira:
Will set this to install by default on the next build!
[Android Q&A, Help & Troubleshooting] NiceDone:
Oh, sorry! I thought there was a problem because of:

File system type raw not supported.

Erasing 'cache' FAILED (remote: 'Partition doesn't exist')

fastboot: error: Command failed

Booted right up, thanks!
[Android Q&A, Help & Troubleshooting] vbhai:
Great job @sperhoooo and @dferreira

@sperhoooo If you look at how I patched the vndk.rc file, you should be able to disable HW overlays before the screen lock.

Also, they need to be disabled in the treble GSI app in settings. If that setting is disabled, you can remove disabling HW overlays functionality from your app.

The pull request for hisense specific treble settings was merged already, so anyone who connects to the internet when they set up their phone should have IMS, HW overlays and audio settings setup correctly.

@phhusson Can you confirm this please?
[Android Q&A, Help & Troubleshooting] Filipexpsp1:
Personal solution to activate USB debugging by PC? I'm locked in recovery and when I do the command adb devices the device appears, but without authorization. Any way?
[Android Q&A, Help & Troubleshooting] iCloud:
So far tested working great for daily usage, is it possible to get the GSI play store certified? i'm not rooted with clean rom from @dferreira

I saw some discussion here https://xdaforums.com/t/how-to-get-rid-of-device-is-not-certified.3954131/

Edit: ignore the above. Just enable Spoof system properties in Trebble settings. After I enabled this, a payment app in my country can be used.
[Android Q&A, Help & Troubleshooting] iCloud:
i think you went to wrong mode. It's power button + volume up to enter to Fastboot mode(should show fastboot mode on your screen). After successfully entering that mode, use your pc to flash magisk patched boot.img(to recover root) or stock boot.img if patched somehow doesn't work. (if you're still stuck)

use this https://www.pling.com/p/2119761/ (MAKSU) seems like they renamed it from magisk to maksu. flash it using magisk
[Android Q&A, Help & Troubleshooting] dferreira:
Already did, it's on Google Drive link I shared a few posts ago 👀
[Android Q&A, Help & Troubleshooting] dferreira:
I'm lost now. Signed boot.img, empty and signed vbmeta and no go. I've tried different versions of Magisk, same behavior, after edl flash and the device goes to fastboot. There must be something that is different for Android 11 that I have yet to find a solution for. Open to ideas.
[Android Q&A, Help & Troubleshooting] Sheep888:
I've found this guide: https://www.thecustomdroid.com/android-11-magisk-rooting-guide/

But you probably found that yourself already...
[Android Q&A, Help & Troubleshooting] dferreira:
Yeah that guide doesn't say much beyond what the regular instructions are for Magisk. Thanks though. Another thing I just tried:

- hexedit of devinfo partition to try to get bootloader unlocked. Surprisingly, the phone took the modified devinfo.img and booted just fine. So I'm thinking if the way to get this rooted would be to use recovery method for Magisk. Will try it since boot.img and vbmeta is a no go.
[Android Q&A, Help & Troubleshooting] dferreira:
Ok, now I fully understand what is happening: we can't boot the modified boot.img, even if signed without unlocking the bootloader first (because that is what allows the phone to boot something not signed by Hisense). Unless we get their key to sign the .img, we can't proceed without unlocking the bootloader.

So I've been prodding devinfo to unlock it first before proceeding.
[Android Q&A, Help & Troubleshooting] dferreira:
OK, I've decompiled abl partition and found a few promising things for unlocking the bootloader:

- there is a command ´Hisense´ and there is a command ´unlockallow´ which takes a enable/disable.

I've tried sending these over fastboot but thus far unsucessful.
[Android Q&A, Help & Troubleshooting] dferreira:
The unlocking capabilities are there, the question now is what we need to put on fastboot to trigger the menu to appear.
[Android Q&A, Help & Troubleshooting] dferreira:
Doing a "fastboot reboot fastboot" brings me to a new screen I hadn't seen before "fastbootd" which I believe is a root-enabled fastboot 🤔
[Android Q&A, Help & Troubleshooting] dferreira:
Version: L2037.6.05.06.00

Update:

http://download-ota-phone.hismarttv.com/Content/DeviceVersionFile/166182853508900801.zip
[Android Q&A, Help & Troubleshooting] Renate:
fastboot is the part of abl that implements the fastboot protocol.

fastbootd is an init service (daemon) that implements the fastboot protocol under recovery.

I've not had much to do with it.
[Android Q&A, Help & Troubleshooting] dferreira:
I was here thinking, it seems the string I was able to decompile is not on fastboot but over EDL. Is there a way to send commands over EDL? 🤔
[Android Q&A, Help & Troubleshooting] Renate:
Huh? What string? What are you trying to do?

Fireshose/EDL doesn't take any fastboot commands.

Some Firehose (on Motorola) can go to bootloader (fastboot) with a specific reset command.

With Python EDL client you must use the "rawxml" to send a specific reset command.

With my client you can just use /zf.
[Android Q&A, Help & Troubleshooting] dferreira:
I was looking at the abl strings and it seems one command (Hisense unlockallow enable) should be sent over to the device to enable the fastboot flashing unlock. I'm thinking if this is a boot sequence command or something we can change over EDL via a command so that we can unlock the bootloader.

The is another string IsAllowUnlock which looks like a build.prop to me too. I feel we are close.
[Android Q&A, Help & Troubleshooting] Renate:
In fastboot sometimes help for sub-commands is implemented.

So, fastboot Hisense might tell you something.

OTOH, if you looked carefully enough at the strings you would have seen the help already.

Those critical bits for unlocking are usually (sometimes?) in a small partition that is signed.

So you can't just flip a bit.

The hardware UART is often enabled during startup (but not console in Android).

To get live feedback on booting would be useful.

Has anybody done a good search for it?
[Android Q&A, Help & Troubleshooting] Sheep888:
I am a noob at this, but maybe this guide helps:

Lock and unlock the bootloader | Android Open Source Project

source.android.com
[Android Q&A, Help & Troubleshooting] dferreira:
I'll check what the build.prop has on this device. Maybe there is something there.
[Android Q&A, Help & Troubleshooting] dferreira:
When I run fastboot Hisense it says it's not a command, but I'm now thinking if this is just a decoy. Because I also see that string on the abl strings. I'll keep prodding.
[Android Q&A, Help & Troubleshooting] dferreira:
[ro.oem_unlock_supported]: [1]

[sys.oem_unlock_allowed]: [1]

So it is possible to unlock. We just need to know how.
[Android Q&A, Help & Troubleshooting] Sheep888:
I am at work, so i didn't have time to check this thread. But maybe the unlocking of the Hisense a5 could give a clue...

https://xdaforums.com/t/hisense-a5-pro-cc-how-to-root-unlock-bootloader.4109021/page-14
[Android Q&A, Help & Troubleshooting] Filipexpsp1:
This is the problem when I do this command the device continues to bootloop, what am I doing wrong? I press volume up and power and when it vibrates I release power. and it remains the same.
[Android Q&A, Help & Troubleshooting] Filipexpsp1:
Dude, after several clumsy attempts to access fastboot, I tried and tried and managed to get in, and actually getting to this stage was just joy. thank you very much. How can I reward you?
[Android Q&A, Help & Troubleshooting] treff89:
How are people finding the battery life on the GSI versus debloated stock?
[Android Q&A, Help & Troubleshooting] damianmqr:
I think it (partly) worked, thanks! Although I did have an issue running it on first boot, but all subsequent boots worked.

I also made the patch script replace TrebleApp.apk with a one I compiled from https://github.com/TrebleDroid/treble_app with the only difference being HW overlays disabled by default in preferences screen (otherwise visiting MISC settings would reset it).

My choices are either trying to skip the wizard somehow, finding a new way to get hw overlay working or making the eink button press disable hw overlays and keeping that functionality in the service (I'd rather avoid that if possible, but it is the easiest solution). I'm not sure yet which to proceed.

But good news is I have no issues so far after the wizard is complete and the lock screen works properly, should be close to being daily-drivable.

(On the note of locking working properly, at least on Lineage I'm pretty sure I accidentally unlocked the phone with a different finger than the one I used when setting up the fingerprint a couple of times so I wouldn't overrely on the reader for security lol, not sure if this happens with stock rom too or if it's just Reader Pro)
[Android Q&A, Help & Troubleshooting] damianmqr:
Okay, I think I have figured it out!

The newest revision should work OOTB for patching most treble GSI images with hw overlays now properly supported. No need to go into settings using some screen mirroring app anymore. (Still no boot animation but not much can be done about this without compiling)

Now the patch script also replaces TrebleApp.apk which caused the issues by enforcing default values for hw overlays shortly after boot. The new apk was made by simply changing the default value of "Disable HW Overlays" to true in two places and that seems to do the trick.

The new patching script can be found under:

Release v1.1.1 · damianmqr/A9PatchingService

Automatically add overlay apk if doesn't exist.

github.com

Again, simply unzip it and in the folder with unzipped files run "sudo bash patch_system_img.sh /path/to/system.img" to generate "system_patched.img"

I also attach my patched version of Andy Yan's Lineage 21-td build with GApps support I plan to dailydrive here:

1.09 GB file on MEGA

mega.nz

Usage is also the same:

Single click eink button to refresh,

Double click to bring up a speed menu.

Just a reminder, use this at your own risk! I do not provide ANY warranty for the code or the binaries used.

I have some ideas of what I might want to change in the future but for now I have to take a bit of a time off from working on this, I'll still try to address any major bugs that might pop up.
[Android Q&A, Help & Troubleshooting] todd-scoops:
Thank you so much! This is amazing work.

I just ran through the script myself, and was able to get everything up and running.

I did notice three things though, battery saver mode can't be enabled, there's no automatic brightness, and the always on display doesn't work even after forcing it.

Is there an easy fix for these?
[Android Q&A, Help & Troubleshooting] damianmqr:
Happy to hear it run alright!

My guess for the first 2 issues is that the overlay is still missing from the build, these should be included in newer Andy Yan's GSI automatically once they are released but I have added it to the patch script in v1.1.1 so it gets copied over if it doesn't exist inside /system/product/overlay yet (so once Andy Yan's GSI builds get updated it shouldn't overwrite that file when it exists), you will have to patch the image again and reflash it for it to work.

I can enable battery saver mode now and automatic brightness works okay, as for AOD not sure how to enable it, I've done it before so it's possible, maybe someone else has a better idea on how to do that.

Here's the new release

Release v1.1.1 · damianmqr/A9PatchingService

Automatically add overlay apk if doesn't exist.

github.com

I will also replace the image in my original post to include the overlay as well once it's done compressing, xz is taking forever..

Replaced links in my other posts with a new img with overlay apk installed
[Android Q&A, Help & Troubleshooting] ferlanero:
Following these steps, after doing:

-- wait until you see a white screen with FastBoot

And then I only get:

Do you know how can I get rid of this error?

I already have an unlocked bootloader, so I don't know how to continue :/
[Android Q&A, Help & Troubleshooting] dferreira:
the steps can be just these:

$ adb reboot fastboot

$ fastboot flash system path/to/file.img

$ fastboot -w; fastboot reboot

the path/to/file.img should be the location where the .img file is. You can drag and drop the .img file to the terminal and it will populate it automatically for you.
[Android Q&A, Help & Troubleshooting] ferlanero:
Ok, following your steps, now I get this error:

Will be there any solution?
[Android Q&A, Help & Troubleshooting] ferlanero:
I'm afraid that if phone can't boot into "fastbootd" it can't continue with "fastboot flash system rom.img"
[Android Q&A, Help & Troubleshooting] dferreira:
But why it can’t boot into fastbootd? 🤯
[Android Q&A, Help & Troubleshooting] ferlanero:
I'm using Ubuntu 20.04 And trying different options in Internet with no luck :(
[Android Q&A, Help & Troubleshooting] dferreira:
I don’t think this is related to the OS you are running. On your phone, it’s like as if it’s missing partitions. I wonder if you should reset to factory - bootloader will be unlocked still - and try again.
[Android Q&A, Help & Troubleshooting] ferlanero:
I have successfully reset to factory, but still no luck after doing

I get:
[Android Q&A, Help & Troubleshooting] ferlanero:
Got it by:

It leads direct to fastbootd mode!
[Android Q&A, Help & Troubleshooting] dferreira:
OK, then you can just proceed to fastboot flash system !
[Android Q&A, Help & Troubleshooting] todd-scoops:
Thanks so much for the quick turn around!

That fixed everything besides the always on display. It's been equally finicky with the other images I've tried and it's not really a big deal.
[Android Q&A, Help & Troubleshooting] biodbl:
Looks like the same
[Android Q&A, Help & Troubleshooting] damianmqr:
For me the AOD starts working on the patched image after setting "Force allow Always-On Display" inside Settings->Phh Treble Settings -> Misc AND restarting the device.
[Android Q&A, Help & Troubleshooting] todd-scoops:
I've done that, and weirdly it's got about a 60% hit rate. Sometimes the screen just goes black instead of showing the clock. ¯\_(ツ)_/¯
[Android Q&A, Help & Troubleshooting] NiceDone:
Is this only in the LineageOS 21? I have the 20 and didn't find the setting.
[Android Q&A, Help & Troubleshooting] damianmqr:
Which build of LineageOS 20 are you using?

I'm not sure why it wouldn't be there, could be due to the version of TrebleApp.apk used?

if you are using a build from @dferreira he should be able to better help you out
[Android Q&A, Help & Troubleshooting] dferreira:
I think this is simply because I have not updated the Treble app source and that is what was included during my build. I’ll update on next build!
[Android Q&A, Help & Troubleshooting] iCloud:
I just tested @sperhoooo image with patched overlay and the Treble settings seems to be different with different naming 'Phh Treble Settings'. 'Spoof system properties' is not included in the settings. Reverting to @dferreira image since I need that option to use certain apps.

Edit: My mistake. After some digging, it appears that the feature has been replaced by the 'Securize' option located at Misc>Securize. Here's the post https://xdaforums.com/t/gsi-13-lineageos-20-trebledroid-based.4517345/post-88003581
[Android Q&A, Help & Troubleshooting] ferlanero:
Thank you very much for your support and your incredible LOS for our beloved Hisense A9. Testing it since yesterday and work great! (y)
[Android Q&A, Help & Troubleshooting] ferlanero:
I'm trying to use "adb shell service call epd 21" to refresh screen on your LOS port. But unfortunately it says "service: Service epd does not exist". Do you know how I can refresh screen thru terminal?
[Android Q&A, Help & Troubleshooting] CatZem:
Howdy, is there a way to boot into fastboot mode using only phisical keys?
[Android Q&A, Help & Troubleshooting] damianmqr:
Not sure if it counts as only using the physical keys, but I'm able to get into fastboot by holding only the volume up button when the device is off and plugging it into a PC.

You should be in normal fastboot mode. If you want to get into fastbootd from there you should be able to just run "fastboot reboot fastboot".
[Android Q&A, Help & Troubleshooting] CatZem:
Thank you, it worked
[Android Q&A, Help & Troubleshooting] dferreira:
That is because my build is running my own service, not epd service because the one in InkOS sucks (bloated and can’t get it to compile with anything other than the original rom source - which is not public). Don’t worry, the next build will have the push to refresh working.
[Android Q&A, Help & Troubleshooting] ferlanero:
Ok, thanks! But is there any way to call your service from adb I would like to automate some tasks wich involve the screen refresh thru terminal like your "Eink Center" app does when pressing the eink button

0.
[Android Q&A, Help & Troubleshooting] dferreira:
Hum... I see. I'll need to expose that method. Currently, the service simply sets the refresh rate to fast during boot so that we can see the boot animation, and the app itself handles the rest. I can expose a BroadcastReceiver ACTION which you can call to trigger the clear screen so you don't have to deal with adb shell commands. You can also trigger via adb shell like this. I'll mark the broadcast receiver as exported so you can do this with the next build.
[Android Q&A, Help & Troubleshooting] ferlanero:
Thanks a lot! That would be really helpful!
[Android Q&A, Help & Troubleshooting] ferlanero:
After several days using the port of @dferreiraAfter several days using the port of @dferreira,After several days using the @dferreira port, I dare say that battery life is much better in the LOS GSI version. It is similar to the stock version with Magisk and the module Universal Kernel Tweak v1.2 installed
[Android Q&A, Help & Troubleshooting] dferreira:
Following this, I was able to create an updated .apk for Eink Center that is signed with platform certificate from Lineage 20 💪 which means I can update the app and we don't need to reflash a new image! I just tested on my device and it installed without any issue over the WIP Eink Center. Will implement the missing features and share the updated .apk
[Android Q&A, Help & Troubleshooting] dferreira:
Eink Center v1.1

- overlay now works properly to change the speed mode of the current app -> automatically added to the Eink Center list of apps

- the main app now shows a list of the apps for which a default speed was set and allows you to quickly change it to faster or slower

- guide the user to setup overlay and accessibility service

- added broadcast receiver for integration with reader apps or Tasker @ferlanero . The receiver is exported and accessible here: com.hisense.einkservice.EinkClearReceiver

Download and install in the phone. It's signed with the same certificate as the build, so it should update as usual.
[Android Q&A, Help & Troubleshooting] ferlanero:
Wow! This is unbelievable! But sadly I can't use it. Although I can install it, accessibility is disabled for security reasons (system says) :(
[Android Q&A, Help & Troubleshooting] dferreira:
You can enable it in Settings > Apps > Eink Center - see here https://stackoverflow.com/questions...ervice-for-apk-which-installed-not-from-googl
[Android Q&A, Help & Troubleshooting] dferreira:
Check in Privacy > Accessibility access too if Eink Center is there. I installed using the command line so maybe there is something regarding the package manager via the browser that causes this. Try:

adb install path/to/file.apk
[Android Q&A, Help & Troubleshooting] ferlanero:
Done! But you need to stop the app first to "allow restricted settings" menu to appear. In going to test app now. Thanks for your efforts!!
[Android Q&A, Help & Troubleshooting] ferlanero:
I'm testing the broadcast receiver with Tasker and automate and it works really well :)

By the way, @dferreira Could I have read these days that you are in Oulu?
[Android Q&A, Help & Troubleshooting] dferreira:
Yep, in Oulu!
[Android Q&A, Help & Troubleshooting] dferreira:
Here is a video showcasing the OS overall. Seems to be fully operational for daily driving!
[Android Q&A, Help & Troubleshooting] treff89:
That's excellent Denzil, again, great work and thanks for all your effort. Hope you're having a good flight.

To all, is there any way we might be able to get better control of the CPU on this LOS GSI, to improve battery drain?

I appreciate undervolting is a thing of the past, but if we have the ability to control cores, governor settings, and max speeds, we should be able to improve idle-but-screen-on drain at least.
[Android Q&A, Help & Troubleshooting] kevkiid:
Edit: ok figured out the button for activating but app preferences don’t seem to show up there.

App is installed and I gave it the permissions needed but it doesn't show any of the apps and not sure how to activate the overlay. I tried with accessibility shortcut but that doesn't do anything.
[Android Q&A, Help & Troubleshooting] dferreira:
Yeah I realised this after I created the .apk 😅 will fix!
[Android Q&A, Help & Troubleshooting] idonotbelonghere:
Hi All, I've been lurking on this thread this thread since it was was about 15 pages and just now created an account to say amaaazing work making this interesting device into the awesome piece of tech it had the potential be.

Loving LOS 20 Denzil!

Any chance of adding an option to Eink Center to change the e-ink button functions to be like the stock rom and sperhoooo's LOS 21? (single-tap to refresh, double-tap to show the refresh speed)

I find myself wanting to clear ghosting much more often than I want to change refresh speed.

Also the refresh speed button area leaves ghosting which can't be cleared away since the button just brings it right back. (Sorry if it's bad etiquette on this forum to request changes without contributing...)

I've attached a mockup of how the current buttons look and the ghosting they leave, plus a dream button layout.

Thanks again for all your efforts everyone! Loving this phone.
[Android Q&A, Help & Troubleshooting] dferreira:
Thanks! The tricky part of this is the bottom navigation and what it needs to work - it requires a dedicated amount of space. I’ll update the theme so that it fits better the eink display as your last screen! About the single click and double click, it’s coming on the next update. I was not sure if double click or a long press for the menu would be better for longevity of the button. But will go with double click for menu, single for refresh!
[Android Q&A, Help & Troubleshooting] dferreira:
Sadly this greatly depends on the kernel. And since it’s not open, we can’t update the kernel to contain more CPU profiles etc :(
[Android Q&A, Help & Troubleshooting] idonotbelonghere:
Long press sounds good too.

Maybe whichever option you don't use could have the option to open the eink center - something is causing the process to crash occasionally and through your app is a fast way to turn it on and off in accessibility.

No pressure on updating the button alignment and style, all the other functional stuff you're doing is amazing!

Cheers.
[Android Q&A, Help & Troubleshooting] CatZem:
Howdy, is it okay that on lineage 18.1 and nitrogen os 12.1 phone calls doesn't work - i can't hear the caller and the caller can't hear me
[Android Q&A, Help & Troubleshooting] bigwigs:
Try the call with wired headset or Bluetooth. And then it will work .

Not sure what the cause is but in some phones that are on non original OS, initially the calls don’t work.

Also, would recommend to use LineageOS 20 GSI provided by @dferreira or Lineage OS 21 GSI provider by @vbhai for better support here.