• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[ROM] [UNOFFICIAL] LineageOS 13 |ASUS Memo Pad HD 7 (me173x) [MT8125]

Search This thread

superdragonpt

Recognized Developer
Apr 27, 2013
4,923
19,266
Lisbon / Taiwan / USA
www.caixamagica.pt
I'm rooted from day one but cannot manage to get first 10 seconds with dmesg. Buffer too small?

Cheers

The buffer is already at max for ARM (32) , you need to unpack boot, and in default.prop of ramdisk allow debugging, and set ro.secure to =0

Tell me what's the screen / LCM revision of your unit, I can quickly do that for you ;)
 

superdragonpt

Recognized Developer
Apr 27, 2013
4,923
19,266
Lisbon / Taiwan / USA
www.caixamagica.pt
Hi. First, thanks for your work @superdragonpt.

I've been running build 20210821 for a few days and, in general, it's been working really good. I haven't experienced any problems with wifi or bluetooth, no crashes, and it feels smooth (considering how old the hardware is). I've only found two issues:

1. Offline charging is not working for me. When the tablet is turned off, the moment I connect the charger, it turns on automatically. And if I shut it down while it's charging, it will simply reboot.

2. The battery indicator never reaches 100%. It stays at 99% even if I unplug it and plug it again. Not a big deal, but I'm curious if that's to be expected or if it's a bug. Nevermind about this. For the last couple of days it wouldn't get past 99%, even after an hour, but that seems to be fixed. Maybe I had a calibration problem or something.

About offline charging, this is all related to the stock MediaTek preloader.

If you recall, on stock ROM , if the battery was under 20% ( or was it 30% ?) You could not boot the tablet, you had to wait for the battery to reach 20% ( or 30%) until you could power up the tablet.

This is all related to that. If the tablet haves more then 20% ( or 30%),then offline charging works fine.

Nasty workaround of Asus on stock preloader due to this LI-PO battery ( not very common battery )

Since offline charging relies on preloader + healthd , and we are no longer using stock healthd binaries ( libraries ) since they are completely broken on lineage 12/ 13.

Now, that's the expected behavior.
A complete fix would be to build a new mediatek preloader and patch for this recent APIs, and that's just not possible
 
Last edited:

superdragonpt

Recognized Developer
Apr 27, 2013
4,923
19,266
Lisbon / Taiwan / USA
www.caixamagica.pt
I started messing around with this tablet again because I was bored and followed the steps to install the CWM-based recovery. The CWM recovery refused to mount /sdcard and the tablet wouldn't boot (stuck on asus splash), however I was then able to install TWRP via sideload, which now refuses to mount system and refuses to use sideload. Anyone got any ideas?
If you have twrp installed, and you have made a backup of your stuff on internal sdcard ...

Then on twrp just format / data, and then reboot to twrp again, and do all wipes ( including /system)

In twrp you can then just connect via USB to PC ( mtp works fine on twrp, unlike the old CWM recovery)
And just flash your desire ROM
 

Jmackley

Senior Member
Aug 12, 2017
447
200
If you have twrp installed, and you have made a backup of your stuff on internal sdcard ...

Then on twrp just format / data, and then reboot to twrp again, and do all wipes ( including /system)

In twrp you can then just connect via USB to PC ( mtp works fine on twrp, unlike the old CWM recovery)
And just flash your desire ROM
Trouble is that I can't mount system at all in twrp, this is my second attempt after fully going back to stock and trying again
Every time I try to do an action involving /system it just fails with invalid argument, also all the partition sizes seem wrong
I'm probably doing something dumb tbh, most of my custom rom experience has been on samsung devices lol

Never mind I was just being dumb lol
 
Last edited:

Mr.T3ILLER

New member
Sep 26, 2021
3
1
Hello fellow platformer
I was surprised to see that someone else is picking at this old platform besides me
Is your accelerometer broken in the core or in the LOS firmware?
I can help if anything, I just recently raised a similar one, I have a platform 8389. I, like you, was able to build the kernel without the source code (only the camera does not work yet)
Sorry for my bad English, I'm from Russia
 
  • Like
Reactions: tweakradje

superdragonpt

Recognized Developer
Apr 27, 2013
4,923
19,266
Lisbon / Taiwan / USA
www.caixamagica.pt
Hello fellow platformer
I was surprised to see that someone else is picking at this old platform besides me
Is your accelerometer broken in the core or in the LOS firmware?
I can help if anything, I just recently raised a similar one, I have a platform 8389. I, like you, was able to build the kernel without the source code (only the camera does not work yet)
Sorry for my bad English, I'm from Russia
Its an kernel issue

This tablet uses an uncommon power gpios, and also custom chips.

I.e. : cameras are connected to a custom External ISP chip the "iCatch" chip, this is the first MediaTek device that I know ...up to this date, that uses this chip, the chip is usually used on QCOMM devices...

( hence main camera still not working , and on the selfie camera I was abled to bypass this chip by using the slightly modified power-on sequence with gated IRQ )

Same thing for many drivers inside the device, they have been extremely modified and hard to reverse engineered

The magnetometer driver was also quite time consuming to reverse, it has also an uncommon way to be powered up.

same thing for the Goodix Touch.Panel
( took some years to figured it out)...

Asus really did an impressive job here ..


Cheers
 
Last edited:

Mr.T3ILLER

New member
Sep 26, 2021
3
1
Its an kernel issue

This tablet uses an uncommon power gpios, and also custom chips.

I.e. : cameras are connected to a custom External ISP chip the "iCatch" chip, this is the first MediaTek device that I know ...up to this date, that uses this chip, the chip is usually used on QCOMM devices...

( hence main camera still not working , and on the selfie camera I was abled to bypass this chip by using the slightly modified power-on sequence with gated IRQ )

Same thing for many drivers inside the device, they have been extremely modified and hard to reverse engineered

The magnetometer driver was also quite time consuming to reverse, it has also an uncommon way to be powered up.

same thing for the Goodix Touch.Panel
( took some years to figured it out)...

Asus really did an impressive job here ..


Cheers

The sad thing is that asus did not provide the complete source code for your device.
I came across their sources a couple of times and thought that they were complete, but recently I needed one driver, and it turned out that they are fake☹️.
As far as I understand, Axel uses gpio for you?
I had a custom axel using gpio, but the reverse didn't help me.
Through trial and error, I picked up the driver and, having slightly edited it, started it.
It differs from the drain, but it works)
With the standard Ktj2-1009 driver, it doesn't work?
Usually, there are no problems with launching with these axels, you like the address 0x1E like my kxtik1004, it seems like some kind of ktjf2 uses such an address, does not work with them?
 

superdragonpt

Recognized Developer
Apr 27, 2013
4,923
19,266
Lisbon / Taiwan / USA
www.caixamagica.pt
The sad thing is that asus did not provide the complete source code for your device.
I came across their sources a couple of times and thought that they were complete, but recently I needed one driver, and it turned out that they are fake☹️.
As far as I understand, Axel uses gpio for you?
I had a custom axel using gpio, but the reverse didn't help me.
Through trial and error, I picked up the driver and, having slightly edited it, started it.
It differs from the drain, but it works)
With the standard Ktj2-1009 driver, it doesn't work?
Usually, there are no problems with launching with these axels, you like the address 0x1E like my kxtik1004, it seems like some kind of ktjf2 uses such an address, does not work with them?
The "regular" drivers just don't work
I've tried that years ago, on the first tests.
The board was assembled very differently, the gpio / power and the way the components where connected on the board is very uncommon.
Hence the i2c slave addresses of this drivers aren't the "standard ".

Another example :The magnetometer needs to be manually powered up by calling the right gpio number that it is connected to, with the specific mdelay while the driver is loading.



This device has been an tremendous headache.

We can only thank Asus by making such an weird board design :p
And by not complying with GPL, the kernel source they released is " dummy " , just an generic one, not containing any drivers used by the device
 
Last edited:

Mr.T3ILLER

New member
Sep 26, 2021
3
1
The "regular" drivers just don't work
I've tried that years ago, on the first tests.
The board was assembled very differently, the gpio / power and the way the components where connected on the board is very uncommon.
Hence the i2c slave addresses of this drivers aren't the "standard ".

Another example :The magnetometer needs to be manually powered up by calling the right gpio number that it is connected to, with the specific mdelay while the driver is loading.



This device has been an tremendous headache.

We can only thank Asus by making such an weird board design :p
And by not complying with GPL, the kernel source they released is " dummy " , just an generic one, not containing any drivers used by the device
Yes, you have a more specific device that you almost made it work (not a working magnetometer is not critical).
I don’t have that much experience in reverse engineering, so I’m probably not your assistant here.
But there is someone to turn to for help)
But I hope that with my sources when I bring them to a working state.
Do you think a simple porting and building of the kernel from your sources is enough to run the firmware on the mt8389?
(p.s. I do not know how much it will be considered a flood in this topic, if we can go to private messages)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hello fellow platformer
    I was surprised to see that someone else is picking at this old platform besides me
    Is your accelerometer broken in the core or in the LOS firmware?
    I can help if anything, I just recently raised a similar one, I have a platform 8389. I, like you, was able to build the kernel without the source code (only the camera does not work yet)
    Sorry for my bad English, I'm from Russia
  • 13
    Disclaimer:
    LineageOS (Lineage Android Distribution) members or anyone else on this website is not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed. Please do some research if you have any concerns about features included in the products you find here before flashing it! YOU are choosing to make these modifications, and if you point the finger at us for messing up your device, we will laugh at you. Your warranty will be void if you tamper with any part of your device / software.





    How to Install:
    1- BACKUP, BACKUP, BACKUP, All will be WIPED!
    2 - Unlock bootloader instructions here
    3 - Flash the new mandatory TWRP Recovery
    4 - Move Rom & Gapps (optional) into device storage
    5 - Full Wipes
    6- Flash Rom & Gapps (gapps are OPTIONAL)




    for GAPPS:

    Choose Gapps Package "ARM" > "6.0" > "Pico" or "Nano" visit OpenGAPPS




    Working:

    • Boots
    • Storages
    • Bluetooth
    • Wifi
    • GPS - GNSS
    • Audio
    • Charging
    • Offline Charging
    • Video decoding/ Playback (i.e.: Youtube) up to 720p
    • android marshmallow new features: Adoptable Storage / Multi Window / etc
    • DRM Widevine : For Netflix, Amazon Prime, etc
    • Sensor: magnetometer: akm8963
    • Front Camera: mt9m114_mipi_raw (ME173X 16GB)
    • etc ....




    NOT Working:
    • Rear Camera: a5142_mipi_raw
    • Front Camera: GC0339_RAW (ME173X 8GB)
    • Sensors: accelerometer (autorotation)
    • You tell me


    Special Thanks

    • OMNI Rom
    • LineageOS
    • DerTeufel1980 & fire855 ( my Team mates from M.A.D)


    GPL Compliance:


    --> "asus_mm" branchs
    5
    Build 20210821

    Kernel:
    • DCT / Power resolve more issues
    • LCM: nt35521_dsi_vdo: Add backlight enable ctrl function
    • Fix magnetometer sensor: akm8963
    • Battery: Corrections
    • Camera LENS AF (for the rear camera) fixed
    • Front Camera : mt9m114_mipi_raw ( ME173X 16GB Version) fixed
    • mmc: more handling fixs
    • msdc: more fixs
    • Touch Panel: GT927: Implement a proper suspend & resume
    • Some other small fixs.
    LineageOS source and device:
    • LineageOS LiveWallpapers, Wallpapers are now included ( as per-user requests)
    • Gello browser removed, it's depricated and has security risks
    • Disable Live Display by default (not supported by this device)
    • Some device clean up
    • Fix some eGL crashs
    • Fix some core missing symbols
    • Added Front camera support ( Pictures )
    • Some other small fixs.



    Build 20210821

    If you have the second hardware Screen revision by LG (check FAQ), flash this
    kernel for the Build 20210821



    Cheers ;)
    3
    FAQ

    Small FAQ:


    Q: How can i Unlock the Bootloader?
    A:
    Instructions for Unlocking the Bootloader can be found here

    Q: After locking the screen, the screen is all black, and/or flickering and I'm forced to reboot, how can I fix this?
    A:
    If you have this issue, then your device uses the second screen/lcm hardware revision
    ( the lgld070wx3_dsi_vdo ), please use the second kernel.zip for this variant, it'll be added an second kernel . zip for people with this variant, on the download section with the ROM release

    Q: how to flash this second kernel for the new hardware variant ?
    A:
    After flashing the ROM, flash the second kernel afterwards

    Q: Where are the Developer Options?
    A:
    Go to Settings>About Tablet, and tap 7 times on the Build Number

    Q: Where is the multi-window mode?
    A:
    in the developer options, you can enable it there

    Q: How can i root this rom?
    A:
    Magisk , latest Magisk works just fine

    Q: Do i really need to update recovery?
    A:
    YES

    Q: I can't flash this Rom on recovery, why?
    A:
    You need to update your recovery to TWRP

    Q: how to work with twrp?
    A:
    in the first time TWRP boots, it'll ask if you want to allow modifications, slide to YES

    Q: how to wipe and flash in twrp?
    A:
    Go "mount" and mount "system"
    then go "wipe" > and wipe dalvik / cache / data / System

    Q: How can i flash the new recovery?
    A:
    If you already have an custom recovery installed:

    Download the new TWRP recovery zip
    flash the new recovery
    reboot to recovery again, TWRP should be now installed

    If you don't have any custom recovery installed:
    - You can extract the "recovery.img" from the .zip
    - Open an terminal
    - Boot to fastboot mode, and type:

    Code:
    fastboot flash recovery recovery.img

    then reboot:

    Code:
    fastboot reboot


    Q: I Love your work, how can i thank you?
    A:
    You can press the "Thanks" button, and if you wish, you can pay me a beer




    ..
    3
    Changelogs


    Build 20201221

    • First Release


    Build 20210821

    Kernel:
    • DCT / Power resolve more issues
    • LCM: nt35521_dsi_vdo: Add backlight enable ctrl function
    • Fix magnetometer sensor: akm8963
    • Battery: Corrections
    • Camera LENS AF (for the rear camera) fixed
    • Front Camera : mt9m114_mipi_raw ( ME173X 16GB Version) fixed
    • mmc: more handling fixs
    • msdc: more fixs
    • Touch Panel: GT927: Implement a proper suspend & resume
    • Some other small fixs.
    LineageOS source and device:
    • LineageOS LiveWallpapers, Wallpapers are now included ( as per-user requests)
    • Gello browser removed, it's depricated and has security risks
    • Disable Live Display by default (not supported by this device)
    • Some device clean up
    • Fix some eGL crashs
    • Fix some core missing symbols
    • Added Front camera support ( Pictures )
    • Some other small fixs.





    Downloads


    TWRP 3.1.1


    Build 20210821

    If you have the second hardware Screen revision by LG (check FAQ), flash this
    kernel for the Build 20210821






    Old Builds


    Build 20201221

    If you have the second hardware Screen revision (check FAQ), flash this
    kernel for the Build 20201221
    2
    New build coming very soon, with some good progress done, more kernel drivers and functions reversed engineered from the stock (closed source) Asus kernel as well as porting those to work on lineageOS marshmallow :)

    Just doing some final tests
    Cheers