yashsingh1/xdaforums huggingface dataset:
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] jony_adamit:
Mine wasn't inverted, just off by some linear function along the x/y axis. Probably resolution differences.

That being the case I'll try and find time to make a thorough post about my experience.

Yep.. you're right on the spot with this one. I can't imagine how I would have succeeded with inverted display.. it was hard enough in my case. The fix is very specific so I see no point in creating a custom TWRP for this. I'm more than willing to compile different versions for [MENTION=9689358]kpierro[/MENTION] to try though.

Where can I download the sources for the recovery image you posted in this thread?

Yeah.. I tried easy ways until I was convinced recompiling is the only way to go.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] kpierro:
This is scary:eek: for me :) more I read your post guys more Im scare to do anything :) respect to all of you guys for you posts and help!!

My case is strange cause even Asus support didnt know what screen I need in first place even by s/n :/. My tablet is Z301M P028 that's what says on the box, but when I opened it to replace the screen it says on the screen frame Z300M. What I have found out after sending back 2 other displays back Asus took Z300M P00C and put new Z301M MB only keeping old screen with lower resolution 1280x800, new screens 1920x1200 screens are for new Z301MF. Now my display works ok, but touch screen is inverted 270 degs, imagine what kind of acrobatics I went through to add WiFi and find on playstore "build prop editor" app and install it, I can open built.prop see all options in it but says device must be rooted to edit :/ Like I said in first post Im new with this stuff, it looks for me like going on Mount Everest on the north side in winter carrying my misses on my back with her shopping :) its why Im looking for easy easier way, Im sure once I will start to go hard one it will never boot up again :/
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] jony_adamit:
Yes.. Asus made some mess with these tablets. I went this way because all repair shops didn't want to go anywhere near this device saying no replacement screen works with it.

I eneded up ordering the closest thing I found on AliExpress (heating the thing with microwave-pillows.. removing bits and pieces of broken glass), and was left with an almost-working screen :laugh:

Currently your device is not usable so I don't see why you should be scared.. If you're willing to follow [MENTION=8132642]diplomatic[/MENTION]'s guide and backup your device with read-back functionality (search for it).. I'll gladly help you get the correct kernel for your situation.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] kpierro:
Awesome mate! BIG thanks, I follow this topic from page 1 so I know [MENTION=8132642]diplomatic[/MENTION] (diplomatic is BIG :good:) guide, time do some action, once I have it ready I'll let u know.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] kpierro:
Well trying to do the read back on SP_FT but I stuck on beginning looking for the "length" , I used scatter file attached by diplomatic on page 1 (mt8163,z301m 16gb), not sure what should I put in there?

Im stupid I wont feel offended if u will agree guys :D so before I will go wrong way I will better ask :)

Any suggestions ??

----

is this tutorial good to do back up?

https://www.youtube.com/watch?v=GMAytZ56hac
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] diplomatic:
I was just thinking that you could make several builds, such as "for Z301M with a Z300M TS" or "for Z301M with a Z301ML TS", and so on.

For TWRP, you can either compile it from source or rebuild the recovery image with your kernel like you've probably done with the boot image. To compile it, check the readme file in the source arch. It should at least put you on the right track. But I think reassembling the recovery would be simpler. Only the kernel would need to be changed.

You're right about the mess. I just took a look at the FT touchscreen source in the kernel. For Z301M(F), there are several types (at least 4) of screens that are in use. The ft5726 driver decides which config & firmware to use based on an ID determined from some GPIO pins. (Guessing these are soldered pins on the mainboard.) So a malfunctioning replacement panel is probably due to a wrong ID. Moreover, the Z300 uses a different driver entirely with its own set of IDs. :eek: Not sure if this is something you changed in your kernel, but this is probably the key to making the replacement screens work.

(What did you mean by "heating the thing with microwave-pillows..."?)

Don't worry about that yet. If you're only flashing the boot image, you can always restore the original from the stock FW package.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] jony_adamit:
:good: I'll do that.

Huh that easy! Now I remember all those repackaging guides talked about boot/recovery interchangeably.. :laugh:

Yes that's exactly where I made the change. I didn't bother messing with the function or IDs... Just set the ID I thought was most likely to work at the end of that function :D

I'm no pro.. I don't have a heat gun. To remove the original screen I had to heat it well so the glue will give. I have those small pillows you put in the microwave to heat them up (filled with small silicon balls) so I just placed it on the side of the tablet, and after a while began removing that part.

[MENTION=9689358]kpierro[/MENTION] I used version 5.1824 to read back most of it - edit option.ini and set

[ReadBack]
ShowByScatter=true

It fails on system partition, but then I just took the length that was written there, and used it on that partition with version 5.1532.00.

Only use version 5.1532.00 for everything else..
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] kpierro:
well I did use SPFT 5.1824, changed false to true, and result in readback like on picture, still not sure which length is the right one,

other thing at the back of the screen I received it says Z300C/CG, my original frame says Z300M, hope it not making it impossible to fix :)
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] jony_adamit:
It will fail on ROM_27, you can take the start address and length from there and use it with the older version. (you press read back and only then connect the tablet while it's turned off).

I think my original frame also said Z300M while in fact I had Z301M (P028). I don't have it anymore so I can't be sure.

In any way, I'll produce several images for you to try. Hopefully one of them will be the right one.

Before anything, here is the version that fixed mine - maybe that will be enough.. I'll be able to work on other versions in about eight hours from now.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] kpierro:
bbbBBBIIIIIIGGGGGggggg thank you!!! :good:

ps. can you simply root these tablets? I tried few root tools but every one failed to do it?
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] jony_adamit:
Once you get TWRP running you can do whatever you want. Check out Magisk!

Since you have your touchscreen inverted I'm thinking the image I sent won't do.. In a few hours I'll look into that driver again and try to find the relevant model that has that rotation..
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] kpierro:
My Z301M still running Android 7, I think Asus will not release such update for these devices ??
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] jony_adamit:
Android 7 IS Android Nougat ;)

The touchscreen driver lists these models:

BIEL_HD_BOE

BIEL_HD_KD

BIEL_FHD_BOE

BIEL_FHD_KD

LAIBAO_HD_BOE

LAIBAO_HD_KD

LAIBAO_FHD_BOE

LAIBAO_FHD_KD

I forced LAIBAO_FHD_KD to fix my screen. That's what in the link I gave you earlier.

I've created a version for you to try based on BIEL_FHD_BOE.

It includes both the TWRP recovery and the boot image.

Here is the TWRP recovery for my original fix, in case you want to try it.

Tell me how it goes, and if needed we'll try a different model.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] diplomatic:
That's great... something I forgot to mention, and maybe you took care of this already, the touchscreen driver does not work in recovery mode by default. You have to remove the 2 references to entry_mode. That variable is how it checks which boot mode it's in, and disables itself in modes other than the main OS. In my TWRP I patched the binary kernel for this (on Z300M and Z301M(F)).
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] jony_adamit:
Oh... I didn't really get into the mechanics of this driver so no.. I didn't take care of that.

I can look into it tonight, but in the meantime I guess [MENTION=9689358]kpierro[/MENTION] can try the boot image using some finger acrobatics :cowboy:
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] kpierro:
before I will do anything further have to share some problem already with readback error (screen 1) dont know is it because of usb vcom problem (screen 2)

wind and rain on my face :) I going to take my hammer and fix it once for good :p
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] jony_adamit:
Prior to anything, try a different USB port with a different USB cable.

If this doesn't work, check out these threads:

https://xdaforums.com/showthread.php?t=1810159

https://xdaforums.com/android/help/how-to-fix-flash-tools-error-t3692259
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] Marcoweb:
Hello,

I have a problem similar to kpierro's one.

After changing the screen, the touchscreen is inverted.

But me, I have an asus Z300M P00C and the touchscreen is LAIB_OGS_BLACK_V9D.0.0 model.

FYI, I came across this video where the problem is the same but on an Asus Z300CG :

https://www.youtube.com/watch?v=pDqpcrbXm2w&t=313s

Do you think that I can solve my problem this way, and if so, with what file instead of mTX1666T2_cfg ?

Regards.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] Marcoweb:
For information, in TWRP the touchscreen is also inverted.

So I have decided to test the version of TWRP for Z301M device.

And now, in TWRP, the touchscreen works perfectly on my Z300M...

Is it possible to implement the driver which is present in the Z301M version of TWRP in my system ?

Regards.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] Riku_Wayfinder:
can't find build.prop in /system in your recovery.. trying to edit to bypass android setup wizard as it is constantly stopping during my tablets initial setup. :(

z301MF
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] diplomatic:
Yes, it's possible. The kernel would have to be updated and recompiled. But there is no up to date source code for the Z300M. However, I think the Z301 kernel source, which is pretty recent, can be used to make a build for the Z300M.

I'm sure it's there. How are you looking for it? Have you tried running 'ls -l /system/build.prop' in a shell after mounting system? BTW, it's not right that the setup wizard is crashing. It sounds like something deeper is wrong with the software or hardware.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] Marcoweb:
Thanks for your reply diplomatic.

I will study that. I have never do that so I will look for a tutorial and let you know if I succeed.

I have another question regarding the scatter file.

Adresses in the scatter which is in the stock firmware are :

preloader 0x0

pgpt 0x0

proinfo 0x80000

nvram 0x380000

protect1 0x880000

protect2 0x1280000

persist 0x1c80000

seccfg 0x4c80000

lk 0x4cc0000

boot 0x4d20000

recovery 0x5d20000

secro 0x6d20000

para 0x7320000

logo 0x73a0000

expdb 0x7ba0000

frp 0x85a0000

tee1 0x86a0000

tee2 0x8ba0000

kb 0x90a0000

dkb 0x92a0000

metadata 0x94a0000

system 0xb800000

cache 0xab800000

userdata 0xc6000000

flashinfo 0xFFFF0084

sgpt 0xFFFF0004

Are your scatter file for Z300M correct, because adresses are different for certain items.

Regards.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] diplomatic:
[MENTION=6770039]Marcoweb[/MENTION], yeah, my scatter file is correct. I don't know where those addresses in the FW came from, but they have nothing to do with the actual partition layout.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] Forcystos:
Hi, just stumbled upon this thread searching around for a solution. I replaced a Z301M (P028) tablet with a Z300M (P00C) screen. Both touch axes are inverted as you might now. How can I solve this? Is there a particular boot.img I should use? I haven't attempted to root it or anything of the sort since I just found this
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] diplomatic:
[MENTION=2403790]Forcystos[/MENTION], it's the same answer I gave a few posts up:

[MENTION=9636415]jony_adamit[/MENTION] said he was going to work on this but so far hasn't come back with any progress... If you want a fool-proof solution solution to this, only buy replacement screens that are labeled for your device.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] Forcystos:
Yeah, I did see the reply, but at the time it's not feasible for me to compile a new kernel since I don't have a development environment for it. Would replacing the driver files in the ramdisk work? Or maybe compiling one kernel which includes all possible drivers and makes them selectable with a build.prop property? As for the part, I do buy them according to the exact specifications, but this is the first time I've run into this issue. I've replaced tens of Z300M/Z301M displays using the same part numbers interchangeably with no issues. Thanks for your help regardless.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] Igor Ka:
Thank you, I can now boot into TWRP on my ZenPad Z300M. The question is, what's next? How do I finalize the rooting? I tried to reboot from TWRP, even installed superSU from zip using TWRP, I only get a "welcome to Android" every time and no effect on file access.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] diplomatic:
Hi there,

You have to install the SuperSU app to manage SU access. I think the Play Store has it. (I'm not totally sure SuperSU is compatible with these tablets. Most people use Magisk. But I don't use either.)
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] Igor Ka:
I did mention SuperSU, which had no effect.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] diplomatic:
[MENTION=9816730]Igor Ka[/MENTION], you didn't say anything about the SuperSU

Android app

. The zip package probably does try to install it, but it's a separate thing from the internal supersu components. Do you have it installed and did you try to open it? Again, I've never installed SuperSU on my Zenpad and I'm not even sure it's compatible. Magisk is much more preferred here...
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] Igor Ka:
I did mention it, nothing happened. (I got it from androidfilehost, UPDATE-SuperSU-v2.82-20170528234214.zip). But I don't insist on SuperSU, if you say Magisk is better suited for this I can try it too.

I'm not a developer, just an advanced Linux user, with some scripting skills. Could you be more specific, some details on procedures?

My nearest goal is to try Ubuntu 16.04 on this ZenPad (probably using Linux Deploy? -- requires root, apk.cafe / asus / zenpad-10).

If all goes well, and not too slow, not too awkward on its small screen, then the ultimate goal could be to run Ubuntu as the primary system (possibly fix it with fastboot? -- as mentioned on wiki debian org / ChrootOnAndroid).
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] diplomatic:
OK, then maybe there's a breakdown of communication or something. Either you're implying something between the lines that I'm not getting or you did not read my previous 2 posts carefully. I totally comprehend that you installed the SuperSU ZIP package in TWRP. I did not miss that part. (You also didn't mention any success or failure messages from installing the zip package.) The thing that I'm asking about is whether you see an APP called SuperSU in your launcher. If you do not see an app called SuperSU in your launcher, then you should install that app either from the Google Play Store, which I previously linked to, or from a 3rd party source. After you install the SuperSU APP, which is the front end for SuperSU superuser/root management, you should open the said app. If the SuperSU APP says that root is installed, you should grant root permissions to whatever apps you want to have root permissions. If the SuperSU APP says that root is not installed, then maybe you should try Magisk. I hope that is clear enough. But keep in mind that Magisk also requires a front-end app called Magisk Manager.

About installing Linux on the tablet, I have not looked into that. If it's just an OS that run on top of an app, I'm pretty sure that's possible...
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] Wilsonb:
You shouldn't have a problem getting Linux Deploy and Linux to work.. Ive been using it on Rooted Nougot Note 8 w/ Kali. The problems you will have is, the old Android version and outdated system on the tablet makes it run dog slow.. .

Runs nice on Note 8

https://xdaforums.com/android/software/guide-install-linux-os-alongside-t3726844/page5
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] lagolas:
As genius that I am I'v erased my system using twrp. has anyone know how I flash my z301m again?

all I have now is fast boot and an option to load twrp recovery menu...

Downloading from asus official website only contains update to the OS instead of the entire firmware from scratch.

I found a raw file but I didn't found z301m model supported. Thanks for the help in advanced!

I think that a guid to flash those tablets is a must in this great thread.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] ahacker:
lagolas, I don't know much about this tablet, but for some other phones there is a thing called fastboot rom, which can be flashed in fastboot mode.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] lagolas:
never mind, i just got it working.

all you have to do is copy the zip of official firmware from asus to sdcard and install from twrp recovery menu.

Thanks for trying, much appreciated! :good:
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] sciurius:
Just followed the instructions...

Flashed TWRP 3.1.1 on my (locked) 16GB Z300M using SPFT 1.1532 (linux) and asus8163_ew_380_Z300M_16GB_scatter.txt.

Boot into recovery.

Installed Magisk v19.0.

Flawless!

(Except for a 5-second boot delay. Oh well...)

Thanks a lot!
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] louisepalmer:
Hi Diplomatic,

I have exactly the same problem like ahacker.

Can you help me ?

In advance, thanks a lot for your time.

Best regards.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] diplomatic:
Hey, there..

What is the problem you're having? That post is over a year old. I don't even remember what it was all about. Probably some compatibility issue with TWRP or the scatter file that has already been fixed in the OP.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] louisepalmer:
I have An ASUS Z300M

Using the right scatter file i succefully install twrp.

All working with asus las update 7.1.x

But i need to dowgrade to 6 or 5 (for old app)

So in 7.1.x, asus zen flash tools d'ont works, i decide to flash original firm with TWRP and bing nothing work (boot)

Always the same error when i'm installing Asus orig V4.0.1 nor 5.1.x :

'set boot part fail can not open misc-sd'

and nothing boot .....
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] diplomatic:
[MENTION=322978]louisepalmer[/MENTION], I see, so it's really nothing to do with ahacker's issue :)

First of all, the "set boot part fail" message is unrelated and totally benign. Downgrading the FW is uncharted territory, tho. Some people have done it on the Z380M. But certain precautions have to be taken. You're actually lucky that TWRP still boots on it and you have a chance to recover your tablet.

Are you saying you can't even install & boot the latest Android 7.0 firmware? But TWRP still boots up, right? What is the exact version number of your FW zip? The numbers you listed are pretty vague. It should be something like WW_5.x.x.x. In a nutshell, installing the latest FW zip should recover your tablet...

That being said, I think it's possible to downgrade to Android 6 on that tablet. The problem is that the old BL doesn't accept unsigned boot images. If you want to install systemless root, you have either sign it with Android Verified Boot signer or unlock the BL.....
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] diplomatic:
Do you have the system partition mounted while you install it? If so, unmount it. The package does take several minutes to install and doesn't quit immediately, right?
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] ahacker:
My problem back then was caused by the wrong scatter fike that diplomatic has long removed. So your problem is likely due to something else.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] louisepalmer:
Yes i have the system partition mounted. I trying now with unmount it.

And yes the package take a lot of time to install (around 5/10 min)

before check list:

1.jpg- 2.jpg

and result:

3.jpg

And tadam, with 5.x, it boot !

I think the only différence with my try, it's the system mounted read only that i forget.

Now I will forget this downgrade story and change tablet :)

A huge thank you for filling my gap on this point.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] diplomatic:
Great! You can try to downgrade it if you want, now that you know how to restore it. Just remember it will be harder to install TWRP and root, and you can't mount the system as r/w in TWRP at all because of dm-verity.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] louisepalmer:
dm-verity is device-mapper-verity ? right. if so, i understand.

Just one more question. the're no simple custom rom for this X300M. No matter version, but just simple with no Asus embedded software ?

have a good days :)

Thanks
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] diplomatic:
No, there's no custom ROMs for any of these MTK Zenpads, [MENTION=322978]louisepalmer[/MENTION]. You can try to disable packages you don't like with root, though...
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] TJackShadows:
I get a Z301MF tablet with 32 storage.

Guess I should try using the Z301MF 16 Scatter file... anyone knows where I can find the correct scatter file?
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] diplomatic:
No, don't use that file unless you want to end up with 16gb storage. There is no scatter for the 32GB Z301MF, so I have to make one. If you could follow the instructions in this post and send me the GPT, I will get back to you with one.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] floppy69:
Hi,

May you make a scatter file for the asus zenpad z301m 32Gb ?

I have extracted the pgpt.bin file you need, it can be downloaded in the following link:

drive.google.com/file/d/1bYYu9IQsQ_foYnkSFt2A7GF1kbWtDIr7/view?usp=sharing

If you don't have time, do you have a tutorial I can use to do it by myself?

Thanks a lot,

Florent
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] diplomatic:
OK, [MENTION=9969042]floppy69[/MENTION], done. Just posted it on the OP. If you're curious about how it's done and you're handy with a hex editor, this article describes the format: GUID Partition Table.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] floppy69:
Thanks a lot, it's working fine.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] TJackShadows:
Sorry for taking a time to respond. I got two errors after conecting my tablet on step 4.

"To download SEC_RO is forbbiden is this phone"

"ERROR S_FT_DA_NO_RESPONSE"

Got to keep trying and them I come back with it.
[Asus ZenPad 10 ROMs, Kernels, Recoveries, & Other ] diplomatic:
[MENTION=9962283]TJackShadows[/MENTION], did you enter the right length in the readback block, 0x4000? If it's only that region, that error shouldn't happen...