yashsingh1/xdaforums huggingface dataset:
[Android Q&A, Help & Troubleshooting] zxczxc4:
Basically any device that ships with Android 9 or later can run GSIs -- the only requirement is that you can unlock the bootloader of the device so that you can flash it.

So if you can unlock the bootloader of the tablet you're talking about - the answer is yes.

But the issue we have with eink devices is that the screen needs special accommodation, so that's what dferreira is thankfully working on. As without that, he said that the screen had to be turned on and off each time he wanted to refresh the display :D

So I assume that's what would happen to the tablet also.
[Android Q&A, Help & Troubleshooting] bigwigs:
I wanted to know what would I need from vendor if any.

the device(Boox Note Air 2 +) has been rooted for now, just got it yesterday.

Someone had already created root instructions for it along with help of @Renate on mobileread.

it is going to be challenging as the eink software not only manage screen refresh but also provides overlay to capture stylus interactions to avoid lag in display for 3rd party note taking apps.
[Android Q&A, Help & Troubleshooting] velcrobomb:
1. How did you mount the system rw? I cannot get anything to mount as I'm getting:

HLTE556N:/ # mount -o rw,remount /system
'/dev/block/dm-0' is read-only

2. I'm seeing the same traffic as you are and i've uninstalled all the apps I could in settings and a couple more via adb. I created a firewall rule to block all traffic to CN.

I looked up the dns entries and there's the one obtained from dhcp, but the 2nd is static and it's the 114.114.114.114 address that was mentioned earlier. I'm unsure how to remove this static entry for the net.dns2.

HLTE556N:/ # getprop net.dns1
10.10.10.1
HLTE556N:/ # getprop net.dns2
114.114.114.114

I tried:

settings put global private_dns_mode hostname
settings put global private_dns_specifier dns.google

but that didn't help.

Let me know what you find that is generating this traffic and I'll do the same.
[Android Q&A, Help & Troubleshooting] dferreira:
Just wanted to give an update: the current EpdManagerService has many classes that override the OS main classes, especially in the `com.android.server.wm` that are built on top of Android 11, at the version where Hisense has built InkOS for their latest ROM version.

As far as I can tell, this is a very tightly coupled implementation of the service & OS and makes it a poke-a-mole game to get the service to successfully compile for any ROM, because either Android has changed the classes they extend or override, or they are no longer available on Android OS...

So I'm taking a step back and creating my own minimal service to interface with the kernel driver. My initial implementation will just set the screen speed mode to the fastest at boot by writing directly to the kernel `/sys/devices/platform/soc/soc:qcom,dsi-display-primary` as a proof of concept. I'm hoping that should give us window screen updates on LineageOS. If it doesn't, this is going to be significantly harder than I anticipated to get the screen to work properly, because I can't just reuse the source that is on stock ROM :-/
[Android Q&A, Help & Troubleshooting] bigwigs:
I'm using nextdns (u can create free account) based on

https://www.reddit.com/r/eink/comments/178moyc

You can add domains to denylist and u don't need to supply each of subdomains, just domain name.
[Android Q&A, Help & Troubleshooting] bigwigs:
can u tell me where is this EpdManagerService class(i.e in which apk or jar file)? I will try if i can dig deeper.

Ideally, from stock rom, we would need kernel source which is not an option. what else can we try to reverse engineer? I'm willing to spend effort as much as i can.

let me know.
[Android Q&A, Help & Troubleshooting] dferreira:
It’s in framework.jar - getting the code is not an issue. The issue is that the code is calling classes that do not exist in latest versions of Android, or methods which the parameters have changed. It seems that Hisense decided it would be a good idea to add a lot of telemetry on the driver, going to as far as logging what app are you currently using, blocking launcher apps, and other things.

We don’t necessarily need the kernel source. We can extract the kernel from the boot.img and have it as a prebuilt kernel for Lineage vendor folder. However, going that route would mean more work for dealing with starting drivers for camera, fingerprint, etc.
[Android Q&A, Help & Troubleshooting] bigwigs:
hmm, usually Android tries best not to introduce breaking changes.

So, you are saying from Android 11 to Android 14? Or Android 11 to Android 12/13?

It seems that Hisense decided it would be a good idea to add a lot of telemetry on the driver, going to as far as logging what app are you currently using, blocking launcher apps, and other things.<- this is weird .
[Android Q&A, Help & Troubleshooting] velcrobomb:
I issued

setprop net.dns1 8.8.8.8 in shell and it overwrote the 114.114.114.114 static entry.
[Android Q&A, Help & Troubleshooting] dferreira:
From 11 to 13/14. The issue mostly is Hisense added a lot of hooks into window manager, activity management, and monitoring boot process, app launches etc into the driver itself, instead of the application layer. No wonder they did not update Android 😣 You can see the mess it is by looking at EpdManagerService.java. Notice the mountain of imports, a lot of them from com.android.server.wm, which you can also retrieve from framework.jar
[Android Q&A, Help & Troubleshooting] treff89:
Whilst you're talking kernel, do you think there's any chance of being able to underclock, or even (holy grail!!) undervolt this sd662?

I've tried all the kernel management apps, and they all seem to allow underclocking, but it doesn't stick longer than a few seconds... ?relating to the powerhal or thermal management.

I've settled on the "Universal Kernel Tweaks" Magisk module as a stopgap measure. It seems to help the problem of freqs being pinned at 1.8 / 2 GHz whilst screen on, which was drastically reducing battery life. But it is not a perfect solution.
[Android Q&A, Help & Troubleshooting] bigwigs:
ok, so Google has modified - com.android.server.wm from Android 11 to Android 13/14, to deprecate the functionality?

Maybe, I'm trivializing it, but the thought here is -

a) where does com.android.server.wm reside? As part of GSI build, can you modify it to make it backward compatible if functionality has been removed or changed? Maybe overriding the methods if changed or adding if removed?

b) what about services.jar?

I will look into EpdManagerServices.java in evening . Have to start day job ;)
[Android Q&A, Help & Troubleshooting] bigwigs:
@dferreira - in below command on Andy Yan's lineageOS build page:-

bash lineage_build_unified/buildbot_unified.sh treble 64VN 64VS 64GN

what do 64VN, 64VS and 64GN stand for?

Also, i also opened downloaded services.jar and see there is lots of custom code in package - com.android.server

and their own package named androidx.

Will continue to dig deeper.
[Android Q&A, Help & Troubleshooting] zxczxc4:
Andy Yan's personal builds // GSI - Browse /lineage-19.x at SourceForge.net

sourceforge.net

vn = no gapps, no superuser

vs = no gapps, has superuser

gn = gapps, no superuser
[Android Q&A, Help & Troubleshooting] bigwigs:
Is this mentioned anywhere ? I would like to know more about GSI and which partitions does this install into? etc.
[Android Q&A, Help & Troubleshooting] bigwigs:
@dferreira - Would GSI overlay mentioned here - https://xdaforums.com/t/guide-how-to-make-gsis-overlay-file-for-your-phone.3878974/ work?
[Android Q&A, Help & Troubleshooting] formeriphoneuser:
@Threedollarbridge Does this jailbreak work on the a9 Pro as well? It has the same CPU?
[Android Q&A, Help & Troubleshooting] zxczxc4:
It's the same device but with more ram and storage.

So yes it will work :)

It's mentioned in the "Naming rules" section of the link I posted above.

As for partitions / more info about GSI, I can't help much, maybe helpful to check out this page?

Generic System Images (GSIs) | Platform | Android Developers

developer.android.com
[Android Q&A, Help & Troubleshooting] formeriphoneuser:
Thanks. Yeah baby!
[Android Q&A, Help & Troubleshooting] bigwigs:
@dferreira - would merging the code from framework/services.jar to Android 14( i copied from lineageOS 21 code) help?

I'm attaching diff report from Beyond Compare tool, which can be used to merge files easily.

if u tell me which files, we need to merge to quick test if merging is an option, then i will do so. Also, if u have ur source u want me to merge then pls share.
[Android Q&A, Help & Troubleshooting] bigwigs:
try replacing mcfg_hw.mbn and mcfg_sw.mbn in /vendor/firmware_mnt/image folder.
[Android Q&A, Help & Troubleshooting] ferlanero:
Do you know where can I download Universal Kernel Tweaks for Magisk?
[Android Q&A, Help & Troubleshooting] treff89:
GitHub - enweazudaniel/Universal-Kernel-Tweaks: UKT is an advanced governor and <code>kernel</code> tweaks collection that aims to greatly enhance power efficiency. Universal Kernel Tweaks is a heavily modified version of Legendary Kernel Tweaks deve

UKT is an advanced governor and <code>kernel</code> tweaks collection that aims to greatly enhance power efficiency. Universal Kernel Tweaks is a heavily modified version of Legendary K...

github.com

Had to tweak it to get it working, since it didn't natively recognise the SD662.

I think I made a file, /data/soc.txt, containing "sdm660", which it then worked with.
[Android Q&A, Help & Troubleshooting] ferlanero:
I already added "cpu=sdm660" to /data/soc.txt and reboot the phone. Is there any more to configure? Is there any way to see if it's working properly? I have chosen the Power save profile during module install on Magisk
[Android Q&A, Help & Troubleshooting] dferreira:
Not sure if this would work. Everything else is working without these. Since LineageOS 21 just came out, I'll give it a go there.
[Android Q&A, Help & Troubleshooting] treff89:
Yeah, looks like there's a log saved at /data/Universal_Kernel_Tweaks.prop
[Android Q&A, Help & Troubleshooting] biodbl:
Please share the UkT link. This Page is off
[Android Q&A, Help & Troubleshooting] treff89:
Nope, it's still there. Download the .zip (not in the release). I don't think it's the perfect solution for us; would much prefer some ability to directly control the min/max frequencies, cores, and governors... or even the holy grail of underclocking with a custom kernel. But UKT does seem to at least help with the issue of pinning to max frequency while screen's on.
[Android Q&A, Help & Troubleshooting] biodbl:
I got it. Thanks. I used the lkt in another device. It was great for emulators. This version seems the only good option for hisense a9 battery
[Android Q&A, Help & Troubleshooting] dferreira:
Lineage 21 doesn't boot. No idea why. Since it's early days for it, I'll focus on Lineage 20.
[Android Q&A, Help & Troubleshooting] bigwigs:
Check - https://www.reddit.com/r/LineageOS/s/OLWzIZ8Zxv
[Android Q&A, Help & Troubleshooting] bigwigs:
@dferreira - have u looked at com.hmct.vision.apk ?

checked out PinnedService in einkpin namespace. It has all code for launcher and EPDManager etc.

Attached screenshot and apk file.
[Android Q&A, Help & Troubleshooting] dferreira:
That is a regular Android Service that interfaces with the EpdManagerService, which is a SystemService - full access to the hardware. Without a working EpdManagerService, there is no app layer API. Those apk need the EpdManagerService to work.
[Android Q&A, Help & Troubleshooting] bigwigs:
Let me know if I can help with epdmanager in anyway.
[Android Q&A, Help & Troubleshooting] treff89:
Here's a quick and dirty, broad, guide of how I enabled 4G VoLTE and VoWiFi on the Telstra network in Australia. It should be applicable to any network though.

Credit to @Hendikins who helped me get it working on another phone, and the process was then largely similar for the Hisense A9. This thread may help anyone who gets stuck https://xdaforums.com/t/how-to-enab...anent-root-on-xperia-5-iii-and-1-iii.4551847/

0) You have to understand that this involves low level control of your device, which theoretically risks totally bricking it - turning it into a paperweight. It went smoothly for me, but you have to accept this risk.

1) Root the device. The device must be rooted to get access to the MBN files and to enable the right USB developer mode. See the great guides in this very thread.

2) Open an ADB shell. Run su. Find your MBN files. Mine were in /vendor/firmware_mnt/image/modem_pr/mcfg/configs/mcfg_sw/generic/aunz/telstra/commerci/mcfg_sw.mbn

Even though it's in the phone filesystem, it's not loaded in the modem, which is what we will now perform.

I imagine if your carrier didn't have their MBN file onboard, you could try to use one from any other sd662 device which did contain it.

3) Copy the mcfg_sw.mbn file to /sdcard on the phone, then retrieve it to your computer with ./adb pull /sdcard/mcfg_sw.mbn (don't change the filename).

4) Install QPST and the Qualcomm drivers from the attached .zip.

4) In the ADB shell, perform

> su

> setprop sys.usb.config diag,serial_cdev,rmnet,adb

After that, devices should show up in the device manager and install one by one manually using Qualcomm driver just youtube this part. Use Qualcomm USB diagnostic 9091 or 9081.

5) Use the PDC tool to install and activate the Telstra MBN

- Load the mcfg_sw.mbn from the computer

- Right-click on the default_global_vl profile and deactivate for Sub0 and Sub1

- Right-click on the profile for your chosen carrier (In my case that was Telstra_Australia_Commercial) and choose SetSelectedConfig -> Sub0. Do the same for Sub1 if you're using a second SIM.

8. Click "Activate" to activate the profile(s).

6) Install Shizuku and Pixel IMS, enable VoLTE

7) ???

8) Profit
[Android Q&A, Help & Troubleshooting] artelse:
Pretty new here, so my question might be trivial. I have a rooted A5 and A9 and want to copy data like SMS and call logs to the A9. The Hisense Phone Clone utility gives me an error when it starts to copy; Send data interrupt. A5 is connected to the AP provided by the A9.

Any ideas or perhaps other ways to copy SMS and call data to the A9?

Thanks!

BTW: interesting progress to get other bands operational on the A9!
[Android Q&A, Help & Troubleshooting] bigwigs:
Can’t u copy sms and call log to SIM card? And then in A9 import from SIM? I know this was possible earlier not sure if it is possible in android. Another option would be to use Google messages and Google phone if u can use them.
[Android Q&A, Help & Troubleshooting] damianmqr:
I managed to get LineageOS GSI running with the screen updating correctly by going in the developer options and enabling "Disable HW overlays"

The biggest pain is to get there as you have to navigate the OS with your only option for refresh being locking and unlocking the screen, but once you do it it works fine. (Dev options need to be enabled first by going into About and pressing on Build number a few times)

I'll try to make a proof-of-concept app that uses root to directly write to the kernel files that @dferreira found to be responsible for refresh modes. I know accessibility services can be useful for toolbars and such but I haven't used those in a while so I'll see how that goes.

Also someone more knowledgeable could make a version of the GSI that simply comes with that option disabled out of the gate.
[Android Q&A, Help & Troubleshooting] treff89:
Use SMS Backup and Restore.
[Android Q&A, Help & Troubleshooting] ntindle:
https://www.reddit.com/r/eink/s/cJ3COpNt6U
[Android Q&A, Help & Troubleshooting] dferreira:
Great find! I did a botched update on PopOS on my dev machine and had to re-setup my machine, this time with my trusted Fedora. I was able to get build LineageOS 20 yesterday and it boots. I’ll see if I can get today the EpdManagerService to compile and expose it on Context so we can call the service on the app layer for the quick tiles and using the refresh button to clear the screen. EpdManagerService will default the screen mode to balanced so that the screen updates on boot, so we don’t need to disable hw overlays.
[Android Q&A, Help & Troubleshooting] damianmqr:
Have you figured out how the backlight temperature can be set?

Writing to epd_thermal doesn't do anything and other files inside dsi-display-primary don't seem to help either
[Android Q&A, Help & Troubleshooting] vbhai:
You absolute beauty! This makes everything work perfectly!!

@dferreira You don't need to look into EpdManager or anything now. With root, we can run this command in a script on start:

adb shell service call SurfaceFlinger 1008 i32 1

Also, without looking into the EpdManager again, we can simply map the e-ink key to execute the kernel command to refresh the display on a single press and cycle through modes on double presses.

Using this Android 14 treble GSI with the DPI set to 300 on the phone and everything seems to be working perfectly including IMS and VoLTE, etc.
[Android Q&A, Help & Troubleshooting] bigwigs:
Do you have download for lineageos img you are using?
[Android Q&A, Help & Troubleshooting] damianmqr:
I have written an accessibility service that does this, I just need a way to set the temperature of display.

It uses root to write directly to kernel and opens the floating window (one in the photo) on eink button press (could change it to double press and make single press clear the screen). It also disables HW layers after boot.
[Android Q&A, Help & Troubleshooting] Renate:
You don't want to set the temperature of the display.

That is literally the temperature of the Eink display, not the color temperature of the front light.
[Android Q&A, Help & Troubleshooting] damianmqr:
Yes, sorry for my wording, I did see your post on that matter earlier in the thread.

I meant I need to find a way to set the color temperature
[Android Q&A, Help & Troubleshooting] Renate:
So look in /sys/class/backlight...

Look for lm3630...

Look for aw99703...

Look for ktd3137...

Look in your DTB
[Android Q&A, Help & Troubleshooting] vbhai:
I am not using LineageOS, mate. Using AOSP Android 14 GSI. I posted the GitHub link to the project in my previous message. Posting it here again: https://github.com/ponces/treble_aosp

Using this one: https://github.com/ponces/treble_ao...2.27/aosp-arm64-ab-gapps-14.0-20240227.img.xz

@sperhoooo Would you be able to share the APK you wrote? I don't care about the backlight temperature really :P
[Android Q&A, Help & Troubleshooting] dferreira:
That is something I’ll look into after I have a working service and app to integrate with that service!
[Android Q&A, Help & Troubleshooting] dferreira:
The problem with this approach is that we use software rendering, can’t be good for video/battery life…
[Android Q&A, Help & Troubleshooting] dferreira:
We can probably get this path from the apk from the launcher on stock rom. That’s where I’m planning to look 👀
[Android Q&A, Help & Troubleshooting] vbhai:
Fun fact: In the stock ROM, this option is turned on by default. This is the approach Hisense went with themselves.
[Android Q&A, Help & Troubleshooting] dferreira:
Interesting... so I could edit lineage boot init to set this up by default. I'll try it.
[Android Q&A, Help & Troubleshooting] damianmqr:
Here it is: https://github.com/damianmqr/a9_accessibility_service/releases/tag/v0.1

Single click should open the menu and double click should refresh the screen.

It was thrown together very quickly so might not work perfectly, no warranty and I might improve it a bit later if I run into any issues trying to daily drive.

1. Download and install the apk

2. Go to app info. Press 3 dots and choose "allow restricted settings".

3. Enable it in accessibility settings.

4. Grant root access when prompted.

5. Use e-ink button to launch menu and give "Display over other apps" permission when settings open

6. It should now be working, use e-ink button to confirm

On reboot you might need to open the menu at least once to disable HW layers.

Try not to set brightness through the OS but rather the menu itself (should work smoother this way).

I'm happy to hear any suggestions but won't have much time for a week or two to implement them.
[Android Q&A, Help & Troubleshooting] bigwigs:
Do I need to flash vbmeta too, with disable command? Or just flash this image to system?

I have rooted a9
[Android Q&A, Help & Troubleshooting] bigwigs:
Would this work with third party launchers like Niagara ?
[Android Q&A, Help & Troubleshooting] damianmqr:
I have only tried vanilla lineageOS, but it shouldn't depend on the launcher so yes

If there are any scaling issues let me know, usually I would test the layouts more but since it's rather niche I only tried my current configuration
[Android Q&A, Help & Troubleshooting] dferreira:
You can flash the img to system once you know it's working as you want. Hisense fastboot won't allow flashing it, so you'll need to use EDL for that.
[Android Q&A, Help & Troubleshooting] damianmqr:
I was able to use the GSI image by running "fastboot reboot fastboot" inside fastboot to get to fastbootd and flashing from there
[Android Q&A, Help & Troubleshooting] bigwigs:
did u have to delete logical partition due to space issues?

the instructions are here --> https://droidwin.com/download-and-install-android-14-gsi-rom/

where did u get ur lineageos image from?

i will experiment with both android 14 gsi provided by @vbhai and lineageos.
[Android Q&A, Help & Troubleshooting] damianmqr:
I run "fastboot erase system" instead of "fastboot delete-logical-partition product_a" before flashing.

Also, "fastboot -w" failed for me but it rebooted to the OS fine and so far there are no issues.

I got the image for LineageOS 20-td by Andy Yan
[Android Q&A, Help & Troubleshooting] vbhai:
You don't need to delete any logical partitions or use edl. Just boot into fastboot and then run the command:

fastboot reboot fastboot

This should open up fastbootd.

After that, just flash the android 14 GSI with:

fastboot flash system <name_of_image.img>

Wipe userdata:

fastboot -w

And reboot:

fastboot reboot

You should have A14 on your hisense now. I'll just provide a version of A14 with hardware overlay disabled and DPI set to 360 by default in a wee bit.
[Android Q&A, Help & Troubleshooting] dferreira:
Add this to your build.prop to set the default overlay HW:

persist.sys.ui.hw=true
[Android Q&A, Help & Troubleshooting] vbhai:
fastboot -w works fine. It just fails to erase the cache partition. Erases userdata fine.