53

[OFFICIAL/UNOFFICIAL] LineageOS 20 for Amlogic GXL/GXM/G12*/SM1 Family Devices

 1 year ago
source link: https://forum.xda-developers.com/t/official-unofficial-lineageos-20-for-amlogic-gxl-gxm-g12-sm1-family-devices.4534935/page-13#post-88495945
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

[OFFICIAL/UNOFFICIAL] LineageOS 20 for Amlogic GXL/GXM/G12*/SM1 Family Devices

link1375

New member
Apr 23, 2023
GXBB = s905
GXL = s905x
GXM = s922
G12A = s905x2/y2
SM1 = s905d3/d3g

Basically what I was trying to say in the title, and as I say later in that post is that these trees will support all of those SOCs, but that developers will largely need to port the device themselves.

Really you will need to fork the device most similar to yours (if it's s905x2 use wade), replace the variables in lineage_$target.mk to match your device, add the DTS files for your specific devices to the kernel directory, and build the correct module for your wifi/BT chip.

It's pretty straight forward. Only additional porting piece may be sepolicy changes for your hardware.

Thank you for the info. Do you have general sources I can check on how to build my own custom ROM (regardless if it is android or android tv/google tv) for a device of my choice? Including ways to avoid bricking the device while debugging the ROM?

Thank you for the info. Do you have general sources I can check on how to build my own custom ROM (regardless if it is android or android tv/google tv) for a device of my choice? Including ways to avoid bricking the device while debugging the ROM?

The wiki linked in OP has a build guide!

Additionally almost impossible to brick these as long as you have access to burn mode.

Reactions: BTK19

bumerc

New member
Jul 13, 2016
GXBB = s905
GXL = s905x
GXM = s922
G12A = s905x2/y2
SM1 = s905d3/d3g

Basically what I was trying to say in the title, and as I say later in that post is that these trees will support all of those SOCs, but that developers will largely need to port the device themselves.

Really you will need to fork the device most similar to yours (if it's s905x2 use wade), replace the variables in lineage_$target.mk to match your device, add the DTS files for your specific devices to the kernel directory, and build the correct module for your wifi/BT chip.

It's pretty straight forward. Only additional porting piece may be sepolicy changes for your hardware.

Hi, i have a question about porting QCOM wifi, chip qca9377, to gxm platform, soc s912. As I noticed, the default here is the old legacy HAL, which apparently does not work properly. The qca9377 driver works and loads fw, wifi can be activated in the settings, but after entering the key, the connection to the wifi network does not occur. The connection attempt fails after a while and the available networks disappear from the settings. Android logs are not available, since adb is activated only with working wifi. Can you advise me anything about this?
Perhaps the use of wcn6740 HAL will bring positive results, have not tested yet..
Thanks for your work!

Hi, i have a question about porting QCOM wifi, chip qca9377, to gxm platform, soc s912. As I noticed, the default here is the old legacy HAL, which apparently does not work properly. The qca9377 driver works and loads fw, wifi can be activated in the settings, but after entering the key, the connection to the wifi network does not occur. The connection attempt fails after a while and the available networks disappear from the settings. Android logs are not available, since adb is activated only with working wifi. Can you advise me anything about this?
Perhaps the use of wcn6740 HAL will bring positive results, have not tested yet..
Thanks for your work!

qca9337 I think has some newer releases under Deadpool's source code on Google source - not sure though.

Deadpool packed all wifi drivers in pretty much haha.

I'd look and try that but I'd need logs to helpful further.

Reactions: bumerc

bumerc

New member
Jul 13, 2016
Last edited: Apr 24, 2023

bumerc

New member
Jul 13, 2016
qca9337 I think has some newer releases under Deadpool's source code on Google source - not sure though.

Deadpool packed all wifi drivers in pretty much haha.

I'd look and try that but I'd need logs to helpful further.

Thank you for your reply. I am attaching some log files here
If you need filtered logs, or any other type of logs.. let me know

Here is the download link to the logs

edit: corrected link

Last edited: Apr 24, 2023

Reactions: npjohnson

PhoneThe4th

Member
May 19, 2021
I have attempted to install the official LineageOS 20 builds on 2 new, separate Dynalink (wade) devices (both updated to the latest Android 12 official builds [security patch Oct. 2022]) and both have bricked after the step "fastboot boot recovery.img" is entered in adb.

It goes to a black screen after boot attempt and just hangs there indefinitely (waited about 10-20 minutes). I attempted to see if fastboot was still able yo recognize the still plugged in device on my adb (on PC) and it does recognize a device, but now the fastboot ID only shows '????????' and is unresponsive after trying any fastboot commands.

I was forced to unplug the usb. Both devices now are bricked as after re-plugging the usb cable back after, adb and fastboot doesn't recognize either device.

As a precursor, I am very experienced in degoogling devices and installing ROMS, but for this, I followed the official instructions to the letter as this is not a phone, which I am most familiar with.
Is the instructions faulty and needs updating? Is the latest official wade OS update preventing something in its security patch? Any help would be useful as I probably will try a 3rd attempt and quit if I get the same bricking issue.

roswellraygun

Member
Mar 9, 2008
uh I don't think that's the new one. That's the same one from this thread lol.

And when the X4 box comes out, it won't be supported by these builds. new tree.

From what I can tell, the ones labeled "Google TV" rather than "Android TV" are the new ones and I've heard they use the S905Y4. I picked up a couple and confirmed they are using Cortex-A35 (rather than the A53 of my dopinder). I'm assuming a new tree is a pretty big lift? I've never done Android build work, but is there anything I could do to help?

From what I can tell, the ones labeled "Google TV" rather than "Android TV" are the new ones and I've heard they use the S905Y4. I picked up a couple and confirmed they are using Cortex-A35 (rather than the A53 of my dopinder). I'm assuming a new tree is a pretty big lift? I've never done Android build work, but is there anything I could do to help?

Not really. And to be honest we likely won't be making said new tree until ADT-4 comes out.

Reactions: roswellraygun

linux2023

New member
Apr 16, 2023
I have attempted to install the official LineageOS 20 builds on 2 new, separate Dynalink (wade) devices (both updated to the latest Android 12 official builds [security patch Oct. 2022]) and both have bricked after the step "fastboot boot recovery.img" is entered in adb.

It goes to a black screen after boot attempt and just hangs there indefinitely (waited about 10-20 minutes). I attempted to see if fastboot was still able yo recognize the still plugged in device on my adb (on PC) and it does recognize a device, but now the fastboot ID only shows '????????' and is unresponsive after trying any fastboot commands.

I was forced to unplug the usb. Both devices now are bricked as after re-plugging the usb cable back after, adb and fastboot doesn't recognize either device.

As a precursor, I am very experienced in degoogling devices and installing ROMS, but for this, I followed the official instructions to the letter as this is not a phone, which I am most familiar with.
Is the instructions faulty and needs updating? Is the latest official wade OS update preventing something in its security patch? Any help would be useful as I probably will try a 3rd attempt and quit if I get the same bricking issue.

This happened because you updated to android 12 stock. Have you already installed dtb and dtbo images? If you did, you first needed to reboot to bootloader again and afterwards should've booted to the recovery.img. If you're soft-bricked you need to enter amlogic burn mode and unbrick via aml-flash-tool (linux only).

stock roms: https://download.ods.ninja/Android/firmware/
aml-flash-tool: https://github.com/khadas/utils (download zip)


Unbrick:
Enter amlogic burnmode by powering on the device whilst holding the button.

cd /home/[username]/build/utils-master/aml-flash-tool/tools/linux-x86 ./update partition dtbo /home/[username]/Documents/wade/los20_20230416/dtbo.img ./update partition _aml_dtb /home/[username]/Documents/wade/los20_20230416/lineage-20.0-20230201-dtb-wade.img ./update partition recovery /home/[username]/Documents/wade/los20_20230416/recovery.img ./update bulkcmd fastboot

You can now decide to install stock rom or try lineageOS again. You can find the stock rom via OP post.

Here's what I did to install lineageOS:
adb reboot bootloader sudo fastboot flash dtb lineage-20.0-20230201-dtb-wade.img sudo fastboot flash dtbo dtbo.img sudo fastboot reboot bootloader sudo fastboot flash recovery recovery.img sudo fastboot boot recovery.img

Here's what I did to install stock:
adb reboot bootloader cd /home/[username]/Documents/wade/wade-qt.20210326-factory/ ./flash-all.sh (you may need to give permissions, do sudo chmod +x flash-all.sh)

Last edited: Apr 25, 2023

PhoneThe4th

Member
May 19, 2021
This happened because you updated to android 12 stock. Have you already installed dtb and dtbo images? If you did, you first needed to reboot to bootloader again and afterwards should've booted to the recovery.img. If you're soft-bricked you need to enter amlogic burn mode and unbrick via aml-flash-tool (linux only).

stock roms: https://download.ods.ninja/Android/firmware/
aml-flash-tool: https://github.com/khadas/utils (download zip)


Unbrick:
Enter amlogic burnmode by powering on the device whilst holding the button.

cd /home/[username]/build/utils-master/aml-flash-tool/tools/linux-x86 ./update partition dtbo /home/[username]/Documents/wade/los20_20230416/dtbo.img ./update partition _aml_dtb /home/[username]/Documents/wade/los20_20230416/lineage-20.0-20230201-dtb-wade.img ./update partition recovery /home/[username]/Documents/wade/los20_20230416/recovery.img ./update bulkcmd fastboot

You can now decide to install stock rom or try lineageOS again. You can find the stock rom via OP post.

Here's what I did to install lineageOS:
adb reboot bootloader sudo fastboot flash dtb lineage-20.0-20230201-dtb-wade.img sudo fastboot flash dtbo dtbo.img sudo fastboot reboot bootloader sudo fastboot flash recovery recovery.img sudo fastboot boot recovery.img

Here's what I did to install stock:
adb reboot bootloader cd /home/[username]/Documents/wade/wade-qt.20210326-factory/ ./flash-all.sh (you may need to give permissions, do sudo chmod +x flash-all.sh)

Thank you for the great info, that unfortunately is missing on the LineageOS official wiki instructions, especially on recommendation to upgrade to the latest Android 12 update. I'll try your advice on my next 'wade' device tomorrow, and have some kind of linux device to try burn mode to fix bricking issues. I'll relay my results.

Reactions: linux2023

S1ngl3-x

Member
Jun 10, 2022
It’s been a bit since I’ve downloaded a build or even used “wade” one thing that has came in my absence maybe: but how do I reboot after holding down the power key? I get the 3 circles now. (Power off, restart, and screenshot) I can’t figure out how to make a selection. I’m sure I’m missing something obvious here? Is it an issue using the onn remote with the dynalink box now? I prefer the full Bluetooth of the white onn remote and haven’t had this issue previously. I have a wireless keyboard and mouse plugged into the OTG but it would be nice to use the remote for power cycling. Thanks in advance for setting me straight

I also cannot even restart after updating. The restart menu is different (contains circles) and I cannot select a single thing.
Also KODI accounts are reset with app restart. The issue appeared after updating the system not the Kodi.

talksickisil

Senior Member
Dec 25, 2009 Aurora,IL
I also cannot even restart after updating. The restart menu is different (contains circles) and I cannot select a single thing.
Also KODI accounts are reset with app restart. The issue appeared after updating the system not the Kodi.

You can restart from the settings menu but yeah, same.

Reactions: S1ngl3-x

Sant1936

New member
Apr 28, 2023
How do I get magisk working on stock? I tried flashing the recovery first, but it only booted into the custom recovery when I did that. The second time I tried without the dtb and o, but wouldn't boot at all. (I accidently flash 2021 stock recovery first, so that might have something to do with it) Now I patched the stock boot from op's post with magisk, but that caused a boot failure as well. Did I flash the recovery wrong?

Sant1936

New member
Apr 28, 2023
How do I get magisk working on stock? I tried flashing the recovery first, but it only booted into the custom recovery when I did that. The second time I tried without the dtb and o, but wouldn't boot at all. (I accidently flash 2021 stock recovery first, so that might have something to do with it) Now I patched the stock boot from op's post with magisk, but that caused a boot failure as well. Did I flash the recovery wrong?

Fixed. Here's how I rooted my dynalink without recovery.
-Make sure you're on the latest firmware and bootloader is unlocked.
-Download the backup tool from https://forum.xda-developers.com/t/...-g12-sm1-family-devices.4313743/post-86327923
-Boot your device in amlogic flash mode by holding the button on the side when turning on and run the backup bat
-Wait until finished. You should have a folder with the boot.img
-To make things easier, use webadb to install magisk to your box and transfer the boot.img
-Patch the img with magisk
>Use webadb again to download the patched boot.img
>Exit webadb and start regular adb on your pc.
-Reboot into bootloader
-Fastboot flash boot (Name of patched boot.img)
-it should succeed. Fastboot reboot.

Good news for all - the new ONN box and the newer generation of devices can be supported by the current tree.

Will just need some work.

We will 100% need the ADT-4 to be released though.
Good news for all - the new ONN box and the newer generation of devices can be supported by the current tree.

Will just need some work.

We will 100% need the ADT-4 to be released though.

Fingers crossed that there won't be any problems with L1 (widevine) and the 2nd generation ONN Google TV box.

Reactions: BTK19 and treypop

talksickisil

Senior Member
Dec 25, 2009 Aurora,IL
Fixed. Here's how I rooted my dynalink without recovery.
-Make sure you're on the latest firmware and bootloader is unlocked.
-Download the backup tool from https://forum.xda-developers.com/t/...-g12-sm1-family-devices.4313743/post-86327923
-Boot your device in amlogic flash mode by holding the button on the side when turning on and run the backup bat
-Wait until finished. You should have a folder with the boot.img
-To make things easier, use webadb to install magisk to your box and transfer the boot.img
-Patch the img with magisk
>Use webadb again to download the patched boot.img
>Exit webadb and start regular adb on your pc.
-Reboot into bootloader
-Fastboot flash boot (Name of patched boot.img)
-it should succeed. Fastboot reboot.

I never successfuly used the flash tool on my dopinder/onn that being said, you can also just use the boot.img from the lineage download page, patch in magisk, then install with fastboot. Never heard of webadb I assume its wireless adb? I'm going to look into this tool thanks for mentioning it

Sant1936

New member
Apr 28, 2023
I never successfuly used the flash tool on my dopinder/onn that being said, you can also just use the boot.img from the lineage download page, patch in magisk, then install with fastboot. Never heard of webadb I assume its wireless adb? I'm going to look into this tool thanks for mentioning it

Never knew that boot.img was stock. At least you have a full backup this way. I found it easier to run the backup tool first, and then booting into flash mode.
Webadb is just adb in your browser. I figured since you're doing the root process while connected to pc, you might as well use webadb to install apps and get the patched boot.img faster

I have a Onn 4K streaming box (the rounded square UHD one for $20), and ended up stuck at the Onn boot screen with no adb/fastboot detection after trying to follow the instructions on the LOS device page. I recovered it with this on Ubuntu 23.04.

Is there a way to flash LOS to this box without soft-bricking? I heard somewhere not to use some dtb files? I'm not in-front of my main set-up currently with a display and I'm just gathering info to try later on.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK