yashsingh1/xdaforums huggingface dataset:
[Android Q&A, Help & Troubleshooting] bigwigs:
Can you confirm if this is script u used?

qdl --debug --storage ufs --finalize-provisioning --include . prog_firehose_ddr_001360E1.elf rawprogram0_001360E1.xml rawprogram1_001360E1.xml rawprogram2_001360E1.xml rawprogram3_001360E1.xml rawprogram4_001360E1.xml rawprogram5_001360E1.xml patch0.xml patch1.xml patch2.xml patch3.xml patch4.xml patch5.xml

i did similar step on Windows using QFIL. with steps below:-

********************************************************

Download and install the following software, where applicable:

The Hisense A9 firmware, which you can find here.

QFIL 2.0.3.5

Qualcomm HS-USB QDLoader 9008 Driver

Reboot your computer.

Unzip the RAR files. This is achieved simply by clicking the first one and then the software will figure out the rest.

Open QFIL and select the following options:

Select Build Type - Flat Build

Programmer Path: Browse and select the prog_firehose_ddr_001360E1.elf file from the extracted firmware file.

Load XML: Select rawprogram0_001360E1 to rawprogram5_001360E1. You don't need to select rawprogram_unspare0. Select patch0 to patch5.

Storage Type: UFS (located on the bottom right side)

Put your phone into EDL mode. This is achieved by having it reboot with the EDL cable unplugged. Then plug in your cable, and hold the power button, volume up, volume down, and the button on your EDL cable. Wait until the backlight turns off, then count down from ten. If your screen freezes with the backlight off, congratulations, you are now in EDL mode.

You should now see your phone as an available port on QFIL. Click download.

If it hangs and fails, put your phone into EDL again, or try using a standard USB-C cable for the download process.

If it succeeds and your phone starts boot looping into a screen which says "fastboot mode", follow Step 5 and 6 again. Pushing the firmware twice generally fixes the bootloop for some reason.

Turn your phone back on by holding the power button. You should now be directed to the setup screen.

********************************************************

with no luck.
[Android Q&A, Help & Troubleshooting] dferreira:
Yep that’s the command line. I gave up on QFIL on Windows because it was finicky. A lot of time it would time out or Windows would disconnect the device half way through.
[Android Q&A, Help & Troubleshooting] bigwigs:
Ok, i tried it but my phone got bricked with ubuntu. So, i had to login to Windows and use QFIL. I have EDL cable so it worked fine. I'm back to working phone with latest update (which i did update it via phone update). The bootloader is unlocked as per developer settings but i need to install magisk and do the steps to get root access.

Another thing weird is that in id it shows ? instead of some id which used be 73xxxx when i do adb devices.

I will try to flash QCN files again which i have various versions of backup - right from 1st root, to adding sim card before LTE band miss. See if anything works again or not.

I have read about posts about persist.img not sure what does it do.

Also, i tried using this https://www.yumpu.com/en/document/view/65354004/imei-meid-programming-qxdmdocx

but nvm folder is empty and it shows inaccessible. This is reason, i cannot add imei and meid. I need that folder to be made accessible.
[Android Q&A, Help & Troubleshooting] dferreira:
In case someone is interested, here's how to get a backup dump of your device using Linux & EDL from Bkerler. I backed up the latest update for A9 so I don't need to upgrade from the older factory image. EDL will create a "dumps" folder with all the files. You can then use EDL to restore your device as it reads from dumps folder.

To restore your phone:
[Android Q&A, Help & Troubleshooting] dferreira:
I’m missing something… the system service fails to start. Seems I’m missing some build.prop property, so I’ll see what the build.prop of stock ROM contains and bring in what is relevant.
[Android Q&A, Help & Troubleshooting] Renate:
Maybe it's crashing on starting EpdManagerService? What's logcat say?
[Android Q&A, Help & Troubleshooting] dferreira:
Seems I named the service package wrong. Should have been com.hmct.multimediaepd. And there seems to be an XML I need too, which I'll retrieve now from stock ROM: `/data/system/associaterun/com.hmct.multimediaepd.xml`
[Android Q&A, Help & Troubleshooting] dferreira:
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<associaterun>
<pkgname name="com.hmct.multimediaepd" allowassociaterun="true" />
</associaterun>

This is the content of it... where should I place this file so that the OS allows the service to start? Nevermind, I can copy it with PRODUCT_COPY_FILES.

Rebuilding. Hope the service kicks in now!
[Android Q&A, Help & Troubleshooting] dferreira:
GSI boot error while the update builds:

01-28 15:01:43.492 1460 1460 E SystemServer: java.lang.RuntimeException: Failed to create service com.hmct.epd.EpdManagerService from class loader dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/com.android.location.provider.jar", zip file "/system/framework/services.jar", zip file "/system/framework/org.lineageos.platform.jar", zip file "/apex/com.android.adservices/javalib/service-adservices.jar", zip file "/apex/com.android.adservices/javalib/service-sdksandbox.jar", zip file "/apex/com.android.appsearch/javalib/service-appsearch.jar", zip file "/apex/com.android.art/javalib/service-art.jar", zip file "/apex/com.android.media/javalib/service-media-s.jar", zip file "/apex/com.android.permission/javalib/service-permission.jar"],nativeLibraryDirectories=[/system/lib64, /system/system_ext/lib64, /system/lib64, /system/system_ext/lib64]]]: service class not found, usually indicates that the caller should have called PackageManager.hasSystemFeature() to check whether the feature is available on this device before trying to start the services that implement it. Also ensure that the correct path for the classloader is supplied, if applicable.
01-28 15:01:43.492 1460 1460 E SystemServer: Caused by: java.lang.ClassNotFoundException: com.hmct.epd.EpdManagerService
01-28 15:01:43.492 1460 1460 E SystemServer: Caused by: java.lang.ClassNotFoundException: com.hmct.epd.EpdManagerService
[Android Q&A, Help & Troubleshooting] bigwigs:
Looks like class name change wasn't made to com.hmct.multimediaepd??
[Android Q&A, Help & Troubleshooting] dferreira:
Yeah this was from before. Still need to see what happened to the build after this fix. After kids are in bed 😅
[Android Q&A, Help & Troubleshooting] bigwigs:
ok, to complete all efforts to restore ESN and IMEI.

I was able to flash original rom using EDL in ubuntu(thanks dferreira for his script) with no luck on esn and imei restore. Same result as in windows.

Various qcn files before imei mess don't sync. not sure, if it is an issue with tools or device or device kernel.

existing sim card work well as before imei mess. I also tried to use existing physical sim card on sim 2 slot and it worked fine.

Not sure, if this will disabled or not, if operator does imei check or sync. Keeping fingers crossed.

It has been good experience and will continue to tinker around.
[Android Q&A, Help & Troubleshooting] dferreira:
I'm missing something... SystemServer keeps saying it can't find the service...

SystemServer: java.lang.RuntimeException: Failed to create service com.hmct.multimediaepd.EpdManagerService from class loader dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/com.android.location.provider.jar", zip file "/system/framework/services.jar", zip file "/system/framework/org.lineageos.platform.jar", zip file "/apex/com.android.adservices/javalib/service-adservices.jar", zip file "/apex/com.android.adservices/javalib/service-sdksandbox.jar", zip file "/apex/com.android.appsearch/javalib/service-appsearch.jar", zip file "/apex/com.android.art/javalib/service-art.jar", zip file "/apex/com.android.media/javalib/service-media-s.jar", zip file "/apex/com.android.permission/javalib/service-permission.jar"],nativeLibraryDirectories=[/system/lib64, /system/system_ext/lib64, /system/lib64, /system/system_ext/lib64]]]: service class not found, usually indicates that the caller should have called PackageManager.hasSystemFeature() to check whether the feature is available on this device before trying to start the services that implement it. Also ensure that the correct path for the classloader is supplied, if applicable.
01-28 21:05:33.406 1418 1418 E SystemServer: Caused by: java.lang.ClassNotFoundException: com.hmct.multimediaepd.EpdManagerService
01-28 21:05:33.406 1418 1418 E SystemServer: Caused by: java.lang.ClassNotFoundException: com.hmct.multimediaepd.EpdManagerService

I think this EpdManagerService is not a traditional Android Service, but a daemon 🤔 looking at the Smali code, there is no reference to Service as the Android framework class. And it seems the package is com.android.server.EpdManagerService so maybe I'm looking at this wrong... will keep digging.
[Android Q&A, Help & Troubleshooting] dferreira:
OK, so things seem to have changed a bit since Android 11. I think I figured this out.

- add static field in Context for epd

- register service in SystemServiceRegistry: this starts the interface, binder and creates an instance of EpdManager

- start service in SystemServer with ServiceManager.addService

It's compiling now. Will report back once I can.
[Android Q&A, Help & Troubleshooting] bigwigs:
More update on imei recovery.

Found app on google play - https://play.google.com/store/apps/details?id=ma.wanam.partitions&hl=en_US&gl=US

this app provides option of backup and restore of partitions on phone. It has option of highlighting which partitions consist of imei and efs. Atleast in Hisense a9 it shows following :

modem_a

modem_b

modemst1

modemst2
[Android Q&A, Help & Troubleshooting] bigwigs:
Didnt realize modem_a and modemst1 are two different partitions.

I have seen instructions to restore modemst1/ modemst2 with NON-HLOS.bin .

There is another file NON-HLOS_001360E1.bin

@dferreira , can u tell me what is difference between regular files and ones with _001360E1 at the end in the name? I saw ur script using files with that names?

I will try to reflash phone and then see if I can flash modemst1 and modemst2 too . Not sure why they are not getting flashed with base rom.
[Android Q&A, Help & Troubleshooting] dferreira:
No idea 🤷‍♂️
[Android Q&A, Help & Troubleshooting] bigwigs:
@dferreira - do u know who provided - https://drive.google.com/drive/folders/1_5PvcvgA9TltEU_XwmiL-t2Eh0VM6C40 for reflashing A9?
[Android Q&A, Help & Troubleshooting] dferreira:
This was shared by the AliExpress seller The Chosen Ereader store, the only reputable eink store in there. They got that from Hisense support, which was shared with me too when I asked. Someone hosted it on their Google Drive it seems. I made my own backup using EDL of the latest update and my own device.
[Android Q&A, Help & Troubleshooting] bigwigs:
Thanks for the answer.

im getting following error while trying to backup using edl script you provided - https://github.com/bkerler/edl/issues/467

tried couple things but didn’t work.

any recommendedations?
[Android Q&A, Help & Troubleshooting] dferreira:
When trying to do this command:

edl rl dumps --memory=ufs --loader=prog_...elf --skip=userdata --genxml

make sure you entered EDL recently and run it. I've noticed that EDL sometimes jams if no actions are triggered after a while. Also make sure the loader parameter is where you have the elf file that allows us to talk with the device.
[Android Q&A, Help & Troubleshooting] bigwigs:
Thanks! It worked. I had to run just plain edl command before running script
[Android Q&A, Help & Troubleshooting] bigwigs:
lol, but it failed at the end :(

firehose - [LIB]: INFO: Calling handler for read

firehose

firehose - [LIB]: ERROR: Failed to open the UFS Device slot 0 partition 6

firehose

firehose - [LIB]: ERROR: Failed to open the device:3 slot:0 partition:6 error:0

firehose

firehose - [LIB]: ERROR: OPEN handle NULL and no error, weird 203918652

firehose

firehose - [LIB]: ERROR: Failed to open device, type:UFS, slot:0, lun:6 error:3

so something is messed up there.
[Android Q&A, Help & Troubleshooting] bigwigs:
Don't know if this is related to rooting or root with incorrect flashing of rbc_config and lte_config.

One interesting behavior i noticed is that before running magisk after rooting via fastboot. in About Phone, i can see IMEI and other sections on phone even though IMEI and other information is unavailable.

Once i run magisk after rooting and it reboots, then About Phone crashes.

I think it has something to do with mcfg and num subfolders being inaccessible in nvm folder.

Also, on my phone - folder safe and sfs are also inaccessible.

Unfortunately, i need someone to check if they also have mcfg and num subfolders being inaccessible in nvm folder. They can use EFS explorer to view the same. Both before root and after root.

Also, im able to change lte_config via QXDM and values are updated successully if i add LTE Bands below 41.

Even though bands are updated successfully , the bands are not availabe on Network Signal Guru. I can see other bands being available on cellmapper.net for my provider.
[Android Q&A, Help & Troubleshooting] Renate:
Actually, everything. Why is it trying to access LUN 6 (of 0 to 5)? genxml is so stoopid (IMHO).
[Android Q&A, Help & Troubleshooting] bigwigs:
So, it is edl issue where genxml option shouldn't be trying to access LUN 6?
[Android Q&A, Help & Troubleshooting] Renate:
I don't know of any device with more than 6 LUNs, it seems standard for UFS.

If you want a bombproof backup, just save the entire flash as 6 raw files.

This whole xml stuff came from factory flashing over blank, unpartitioned memory.

If you're partitioned, why not say, "save boot to boot.img" instead of specifying all that junk in an xml file?

For me, I need to grab or write a partition. I never need to have some partition that I don't even know what it does on my desktop (as a separate file).
[Android Q&A, Help & Troubleshooting] bigwigs:
i wanted to easy route if available as currently, playing with imei restore, i end up flashing to older version of image as that is only one available, then manually upgrade to current version of inkOS and then root the device.

so, i was trying to use script provided by @dferreira , to reduce manual upgrade work and reflash to latest version.

already have created root.bat, debloat.bat scripts so i don't need to do anything manually apart from upgrade to latest version of inkOS.
[Android Q&A, Help & Troubleshooting] Renate:
I like bats, but makefiles are better because they check for success on each command without you doing anything extra.

The easiest way to get Gnu Make for Windows (without wacky dependencies) is to get it from the Android NDK at NDK\prebuilt\windows-x86_64\bin\make.exe
[Android Q&A, Help & Troubleshooting] dferreira:
A9 only has 5 luns. You can ignore that. You'll have this at the end:
[Android Q&A, Help & Troubleshooting] dferreira:
So update on the service building. I messed up the previous attempt on SystemServiceRegistry. I took a closer look at the Smali of epdmanagerservice and there is no binder. So this is a systemservice without binder. It's now compiling again - it had failed before. Had to add this to SystemServiceRegistry:

registerService(Context.EPD_SERVICE, EpdManagerService.class,
new ContextAwareServiceProducerWithoutBinder<EpdManagerService>() {
@Override
public EpdManagerService createService(ContextImpl ctx) throws ServiceNotFoundException {
return new EpdManagerService(ctx);
}
});

I've also patched Context so that I can refer to it programmatically via Context.EPD_SERVICE. Will keep you posted.

EDIT: Lol... I just realised I forgot to add EpdManagerService to the imports... that's why SystemServer couldn't find the class 🤦‍♂️ added now.
[Android Q&A, Help & Troubleshooting] bigwigs:
lol, u think u will be able to provide the files today?

i can stop my experiments with imei fix and wait for the files ;)

i was going to get another provider sim and see if i can get it working with imei mess for 2nd sim slot.
[Android Q&A, Help & Troubleshooting] dferreira:
I'll provide them as soon as they are ready :P I want to daily drive it a couple of days to make sure everything is OK to avoid folks flashing this and then they get stuck with a broken OS. I feel I'm close to release. Everything else is OK, Google Play, screen resolution, sensors, camera, fingerprint, etc.
[Android Q&A, Help & Troubleshooting] bigwigs:
thanks. take your time :)

btw, i have flashed my device so many times, i have flashing in my dreams ;)
[Android Q&A, Help & Troubleshooting] bigwigs:
@dferreira , if and when u get time and if u can document the steps u took to create lineageOS for this device, it would be great.

I'm interested in learning custom rom development and get some programming skills polished again. :)
[Android Q&A, Help & Troubleshooting] dferreira:
Majority of the work is here: https://github.com/AndyCGYan/lineage_build_unified

I created a new vendor, and added the files I extracted from the stock for epd from services.jar and framework.jar as Renate mentioned they could be found there and they were! I will for sure host them on my GitHub so that anyone can use them with any other custom GSI ROM.

GSI is supported on Android 10+ devices and basically allows us to run a system.img and keep everything else intact.
[Android Q&A, Help & Troubleshooting] dferreira:
97%... almost there...
[Android Q&A, Help & Troubleshooting] ntindle:
I'd love to know if things like Payment, Android auto will work because of these changes
[Android Q&A, Help & Troubleshooting] dferreira:
Yes, those will work.
[Android Q&A, Help & Troubleshooting] zxczxc4:
Thanks dferreia (I hope you did get that ETH reward from the OP!), plus Renate for the good advice and the others who have been helping too.

My A9 is on the way, and excited to test out the rom when it's out.

What about the phone specific things, like the extra side button(?) I think it has, plus importantly the screen temperature control?

I read that you will add the eink refresh mode as a quick settings tile, that's great.

Anyway, no pressure, all the hardwork is very much appreciated, thank you!
[Android Q&A, Help & Troubleshooting] dferreira:
Thanks! I did not get the ETH reward. Without everyone here, we would have not gotten there. And yes, programming the button is part of the goal 😉
[Android Q&A, Help & Troubleshooting] zxczxc4:
That's a shame about the reward. OP does say to email him :)

As long as the temperature control front/backlight is controllable via that EpdManagerService that you're putting in, then that's good too. It would be nice to make Tasker change from "cool" to "warm" at certain times of day.

I'm also curious about what will happen when we press the power button to turn the screen off. (not referring to power off)

Will the screen be blank, or display the lock screen, or keep displaying last viewed screen?

I'm not sure if LineageOS supports 'Always On Display' or if it's always vendor specific, but that would be cool to treat our eink screens here as an AOD.
[Android Q&A, Help & Troubleshooting] Kandwo:
A question regarding call quality.

Whenever calling on an app like telegram or signal the other party hears an echo of themself in the call. This seems to be present in all apps.

However, when calling normally the is no echo for the other person.

Does anyone have an idea why this is and how to solve it?
[Android Q&A, Help & Troubleshooting] strann0:
I have a Hi Reader Pro, the camera-less version of the A9, and I can't get ReVanced working properly since MicroG closes every time, unless you manually open it.

The phone came from AE with LiteGapps, in order to get some Google Services capabilities. Is there any way to use ReVanced without MicroG and with those LiteGapps? Building the client without MicroG doesn't seem to work either.
[Android Q&A, Help & Troubleshooting] bigwigs:
Are u using wifi for calling on app like telegram or signal? and have u enabled wifi calling for regular call?

If u have not enabled wifi calling for regular calls and using wifi for calling on app, it could be due to wifi signal quality. Try if u can make calls using mobile data instead of wifi when calling over app or try use another wifi network.

More details on ur phone would be helpful.

A9 - RAM details

Update details

Rooted or not?

Where did u download telegram and signal apps from? r they updated?
[Android Q&A, Help & Troubleshooting] doschxda:
hey, I am ready to take the dive. But I am not sure, or not smart enough, to gather from this thread if LineageOS is ready or not for the A9. Would be happy to test and report back on any issues if someone can point to where to start...
[Android Q&A, Help & Troubleshooting] bigwigs:
Short Notes/Steps on Rooting/Debloating A9

To prepare phone and getting boot.img on ur phone:-

[Hisense a9] Root - Reward Offered (Snapdragon 662)

The Hisense a9 is an e-ink 4g smartphone that I want to use as my own Frankenstein light phone. I would like to root mine and use this custom launcher to create a minimalist phone that isn't quite as useless as the Light Phone concept (i.e...

xdaforums.com

Root Commands after downloading newly created boot.img from ur phone:-

adb reboot bootloader

fastboot Hisense unlock

fastboot erase avb_custom_key

fastboot flash boot_a boot.img

fastboot flash boot_b boot.img

fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img

fastboot continue

After reboot, with rooting done successfully:-

To install GApps , refer to https://xdaforums.com/t/hisense-a9-root-reward-offered-snapdragon-662.4495809/page-11#post-88983317

Fdroid - You can install f-droid from their website: https://f-droid.org/

How to block folder app recommendations and Chinese DNS requests via NextDNS

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

Debloating(removing trackers) refer to

https://www.reddit.com/r/eink/comments/hdz149

Please download keyboard,browser, file, phone, messages and other replacements app before disabling out of box apps.
[Android Q&A, Help & Troubleshooting] biodbl:
Diferreira is developing and testing the new rom.
[Android Q&A, Help & Troubleshooting] wangxh:
I installed the wrong Kitsune Mask model. I booted it directly into reboot and wanted to delete it in the reboot interface. Moto G Pro Magisk, Can u tell me how to delete this model in the reboot interface?
[Android Q&A, Help & Troubleshooting] bigwigs:
Which phone do you have? You will need to reboot in fastboot mode and then flash boot.img of your phone to replace wrong image.

If you cannot boot into fastboot image then check it recovery mode works or not.

If not then last option would be using edl mode, which will require edl cable and right image files for ur phone
[Android Q&A, Help & Troubleshooting] bigwigs:
Further LTE band change results

Modifying following is possible:-

ID Desc Category

01877 rf_bc_config CDMA

06828 lte_bc_config LTE

65633 lte_band_pref System

based on https://xdaforums.com/t/unlocking-bands-for-na-usage.3884098/

But it has no impact as enabling GSM and CDMA bands via Network Signal Guru as one gets "Operation prohibited" message.

Changing lte_bc_config to value that is beyond LTE bands enabled default and Frequencies supported by phone(lte_band_pref changes) sometimes results in disablement of radio. Re-enablement requires erase and reflash of modemst1 and modemst2. Re-enablement results in IMEI and ESN loss.

Will wait to see if move to Lineage OS results in any different results.

Also, still waiting for new sim card to see if new number can be enabled after loss of IMEI and ESN.