Need help with device tree SM-T380 - Samsung Galaxy Tab A series Guides, News, & Discus

Ok, got a T380. Device specs show it should be much more snappy and responsive than it is. I want to build an ASOP or lineage build for it. There are no custom ROMs right now for my device. Can any dev point me in the direction of a tutorial for building the device tree and obtaining the proprietary blobs? I have been googling for weeks and most of them tell me to get the blobs from a similar device running LOS. I have some coding, flashing and linux expericence, so I am not going in as a complete noob. Any advice or help would be greatly appreciated. TIA

I started compiling roms in August so I have been through this journey in which you are about to start. I'm not a developer, but this is what I learned so far.
If you have a supported lineageos device, I suggest you build that first following the guides they have written. This will ensure you have the proper toolchain, tools, OS, memory, hard disk space, etc setup properly. Here is an example.
https://wiki.lineageos.org/devices/gtelwifiue/build
For the device tree, I did a search using "github sm-t380" and it came up with
https://github.com/tangalbert919/android_device_samsung_gta2swifi
Once I knew the code name, gta2swifi, then I searched "github gta2swifi" which lead to
https://github.com/lilindian16/android_device_samsung_gta2swifi
which looks like a good start.
In order to build the rom, you need 5 things.
1) device tree
2) kernel source
3) vendor blobs
4) roomservice.xml
5) twrp
For kernel source, the T380 has open source code at
https://opensource.samsung.com/main
Type T380 in search box and download the Pie kernel source code.
For vendor blobs, if the
https://github.com/lilindian16/android_device_samsung_gta2swifi/blob/master/proprietary-files.txt
is correct, there's over 2300 files that you need to copy over.
For roomservice.xml, take an existing one that is close to the T380 and make modifications to it. I built the T350 and you can look at the roomservice.xml file at
https://forum.xda-developers.com/ga...ficial-lineageos-17-1-galaxy-tab-8-0-t4162573
For twrp, use an existing T380 twrp.
Video tutorials that I found useful in building roms.
https://www.youtube.com/c/AlaskaLinuxUserAKLU/videos

Thanks so much for the help. I am pretty much in the same spot. I have rooted and flashed just about every device I have ever owned and feel pretty confident I can build a ROM for this device. I already have rooted and TWRPed my T380 it was the vendor files and proprietary blobs that were totally dumbfounding me. I will check your links and work through it. Again, thanks so much for the links.

Okiera29 said:
it was the vendor files and proprietary blobs that were totally dumbfounding me.
Click to expand...
Click to collapse
If you haven't noticed, the vendor blobs are at
https://github.com/lilindian16/android_vendor_samsung_gta2swifi
One other tip. For your first build, build an eng build so you have adb logcat enabled right away. It took me days to figure that out when the boot animation was stuck or the tablet was boot looping. The magic command is
TARGET_BUILD_TYPE=debug TARGET_BUILD_VARIANT=eng make -j2 bacon
-j2 because my machine is only dual core and I only have 12GB DRAM to build.
It's the only way to see debug and information messages while the tablet is booting.

Thanks man! Still trying to get it set up right. I tried to build a debloated, deknoxed stock rom with Android Kitchen and failed. Luckily, had a TWRP back up so the soft brick wasn't an issue. I am determined to figure this out and get a thin custom ROM built for this sucker. I need to figure out overclocking too. You have been a tremendous help!!!

@Okiera29 Were you able to get a working LineageOS rom for your T380. If you don't mind telling me what you have tried and if you had success that would help me out a lot. I'm a newbie trying to find my way around custom roms

I forgot that I participated in this thread. I don't have the SM-T380, but one of the links I referenced earlier shows activity in the last month for the SM-T380 and as recent as < 48 hours.
Looking through the commit history, @andr01dfr3ak might actually have a running 18.1 because enforcing selinux is usually done last after the build is up and running.
Albert, aka andr01dfr3ak also worked on earlier versions of the SM-T350 with 15.1. Since then, I have helped build SM-T350 16.0 with some people and then built 17.1 and 18.1 basically on my own.

I do not have the SM-T380 either, so I am not sure if what I have right now even works. I just know that I can build LineageOS for this device.

@andr01dfr3ak built this rom for me I posses a SM-T380 but I don't have it rn I got stuff removed... for awhile.... If @retiredtab has the device may I suggest having @andr01dfr3ak give @retiredtab the rom to run?
{Mod edit: Link removed} my Discord Server.

i'm trying to download the rom from @andr01dfr3ak but there aren't any available mirrors on androidhost

Want to chime in here -- I too have a Samsung SM-T380, rooted and have TWRP 3.2.3-1 flashed to recovery. I downloaded an image lineage-18.1-20220114-UNOFFICIAL-gta2swifi.zip from somewhere, which is what I think @andr01dfr3ak has been working on.
I am able to successfully install the image, but when booting, the following message is displayed at initial splash screen: "KERNEL is not seandroid enforcing"
And then the display goes dark.
I'm more than happy to provide logs and/or test images if that would be helpful? Please let me know if there's anything I can do to move this along so we have a stable Lineage 18.1 image for the SM-T380!

I've (somehow) got this tree to boot. Whatever the manifest in the tree was doing, it wasn't working, but reverting to the stock one (and downgrading everything) seemed to do it.
I can't get the camera HAL to detect any cameras, though. I think Bluetooth also has issues, but at least WiFi/sound/earbuds are working so at the very least you can use it as a media consuming tablet. And I also have no idea if it works outside of my own device either.
Am a little uncomfortable uploading something that barely works, though, but if anyone capable of building it wants to find out, I have a tree here:
https://github.com/lifehackerhansol-android/android_device_samsung_gta2swifi
https://github.com/lifehackerhansol-android/android_vendor_samsung_gta2swifi

@lifehackerhansol Mind DM'ing me a link to your build? I'd like to work on this a bit and reviewing your progress would be helpful!

christophershaw said:
@lifehackerhansol Mind DM'ing me a link to your build? I'd like to work on this a bit and reviewing your progress would be helpful!
Click to expand...
Click to collapse
So I no longer have this device, it has been given to a family member and reverted to stock. So I can't really make a build and confirm that it's working. The device tree I left above is exactly as I left it back when it did work, so you can go off that.
Sorry, I lost the existing build since. Had to reinstall Linux on my machine and all.

I now have another SM-T380. (lol)
The camera was a kernel issue. Turns out we were using j4primelte's kernel, and it worked all the way until it tried to initialize cameras, because our device's cameras aren't supported in that kernel. It's a miracle anything else worked... Well that was the first problem. The second one was that the blobs were old and Samsung botched their upgrade to 9.0 so I had to deal with several workarounds for that. Anyway camera fixed.
Currently in the middle of mucking with SELinux. When that looks clean I'll push a build(?)

Related

Developer Den: >>> Kernel Sources are here. <<<

Alright, we need to stir the scene up... and God is it past the due time.
Blu has had the Kernel sources available in their ftp server since August IIRC and the Gionee equivalent of this phone has been running Marshmallow for more or less the same time.
So here's my github with the kernel sources on it: https://github.com/batoussai/android_kernel_VivoXL
I fixed the problems I found with improper makefile prepending and inclusions in headers and c files. It compiles successfully but so far I haven't had time to test if the phone works with it flashed, and I really need some sleep now.
What needs to be done now is:
-Get a reliable way to unlock the bootloader.
-Test the kernel as it is now.
-Start development of modified kernels.
-Think of what should be done afterwards.
Anyone and everyone is more than welcome to help (specially since I'm mediocre dev and things will take forever with only me working)
Reserved
you mention getting the bootloader unlocked, but is that only to get TWRP on there or allow kernel changes? i have TWRP, supersu, but still have a locked bootloader... I have been wanting to make some real changes on this phone
stonerphoner said:
you mention getting the bootloader unlocked, but is that only to get TWRP on there or allow kernel changes? i have TWRP, supersu, but still have a locked bootloader... I have been wanting to make some real changes on this phone
Click to expand...
Click to collapse
I'm not sure you will be able to edit the kernel partition with a locked bootloader.
My phone decided that it would accept having the bootloader unlocked now and I don't really want to test relocking it.
And in other news, the compiled kernel works as supposed and my phone still boots after flashing it (had to repack the ramdisk from the stock kernel to make the boot.img)
let's try it for variant condor pgn-605 p8 the same as blu vivo xl but bootloader is already unlocked
i have bootloader unlocked i hope i can test it with rom like cm 13 as soon as one of you can make it for us
https://atozhacks.blogspot.com/2016/10/rommmhios-rom-for-gionee-splus-by-splus.html
i found this rom work perfectly
This might might provide some pretty useful references for me. Thanks @mwalid25!
And updating a bit, currently working on the device tree and proper ramdisk generation. As soon as I get results I'll upload it to github too.
Also, if anyone wants to help pester Blu into releasing the stock firmware too, that'd be appreciated since currently we depend on third party stock releases that I can't attest the integrity since I didn't bother comparing them to my stock firmware while I could.

[ROM][EXPERIMENTAL][BOOTLOOPS][XT907][KKBL][LineageOS][Nougat]LineageOS 14.1

THIS ROM BOOTLOOPS. NO NEED TO CONFIRM OR POST SUCH ANYMORE​
Basically this ROM is an experiment at building LineageOS 14.1 (Nougat) specifically for an xt907 KKBL
How I built it:
Set up a virtual Box (on Win7 64b) to build Lineage OS 14.1 (followed their instructions)
Source: https://github.com/LineageOS/
I used an existing xt907 KKBL device tree (https://github.com/LineageOS/android_device_motorola_xt907) it looks old, but I built a JBBL device tree based from this project, and that booted. I also built TWRP using this device tree, and I have been told that it works
Basically, I have done no "magic" here. If this ROM works, I may also be able to build crDroid & ResurrectionRemix Nougat as well. Actually, my JBBL from this device tree worked better for crDoid and RR than LOS
This is an experimental build of LineageOS 14.1, Android version 7.1.2, an experimental build for a non-official device (ie xt907 KKBL).
I personally do not have an xt907 with KKBL, but an xt905 with JBBL, so I can't easily test this KKBL ROM. PLEASE tell me if it works or not.
The good
It's LineageOS
It's Nougat!
It's for KKBL
It's built from a device tree that I hacked into JBBL, and that booted
A TWRP for KKBL was built using the same device tree, and I am told that that works
It Builds
The bad
I have no idea if it boots as I don't have a KKBL installed​
Since I do not own an xt907 KKBL, I cannot test this zip personaly, and hope someone with an xt907 KKBL will try the zip and let me (and others) know if it works?
What I hope is that if this boots and runs, I will try building crDroid Nougat (and maybe ResurrectionRemix) for the xt907 KKBL. If they also work, I personally will up[grade to the KKBL (my JBBL version of crDroid has numerous FC's)
Credits: All credits go to LOS contributors and CM maintainers before them.
Almost forgot, Flash this ZIP at your own risk, the responsibility is all yours, it is provided as-is, with no garantees or whatever and I will not be held resonsible for any damage to your device or its data etc etc etc
Installation:
1) Download the ZIP
2) Boot into TWRP recovery (I wou;d recomend updating to TWRP 3.x (see myh othere thread I have been told trhat it works)
3) Make a nandroid (you should definitely be going back) And remember, a nandroid is NOT 100%! if you don't understand this, maybe trying this is not for you.
4) Wipe system/data/cache/dalvik
5) Flash update package (ie install the zip)
6) Flash GApps (probably Open GApps pico...) if it doesnt work, try a wipe and not flashing GApps (it helps with crDroid for JBBL)
6) Reboot to system
If it falls over, please get some logcats and post them on hastebin/pastebin etc etc NOT HERE, only the links. Hopefully we can fix it and have some highly customisable nougat ROM's for your device. And the steps to make it work may also be helpful for the next Android iteration.
Download Link: https://clicknupload.org/uvu9uknep9ku
And please post how you go with this ROM, either way, I would like to know if it works or not to decide if to build crDroid and/or RR. If it does work and crDroid does not, I may get around to building a non experimental build, with Overclocking enabled.
Cant download from that link
Shmaks said:
Cant download from that link
Click to expand...
Click to collapse
what exactly is the problem? have you tried a different browser? I can directly through chrome and also using TOR browser.
DiamondJohn said:
what exactly is the problem? have you tried a different browser? I can directly through chrome and also using TOR browser.
Click to expand...
Click to collapse
Tried two browsers - chrome and firefox. Click free download - create download link - click here for download - have Error The requested URL could not be retrieved
Fix: downloading with TOR works))
Shmaks said:
Tried two browsers - chrome and firefox. Click free download - create download link - click here for download - have Error The requested URL could not be retrieved
Fix: downloading with TOR works))
Click to expand...
Click to collapse
It may of been a timing thing. I posted the link right after the upload finished.
Just flash it (with and without gapps) - neverended boot animation, bootloop
Shmaks said:
Just flash it (with and without gapps) - neverended boot animation, bootloop
Click to expand...
Click to collapse
how much time did you give it? I have found 8-10 minutes is the norm for the first boot, and I allow 15 before I concede its not going anywhere.
Never mind, I am also just preparing to build crDroid (Nougat) (source is a big and slow download). I found that with the KKBL code altered to JBBL, crDroid booted while LineageOS 14.1 did not. And maybe LOS13 will boot. The fact that LOS14.1 at least showed the animation is a big positive.
Out of interest, did you flash it using TWRP 3.1.1?
DiamondJohn said:
Out of interest, did you flash it using TWRP 3.1.1?
Click to expand...
Click to collapse
Yes, TWRP 2.8.6 didnt flash it
Shmaks said:
Just flash it (with and without gapps) - never ended boot animation, bootloop
Click to expand...
Click to collapse
DiamondJohn said:
how much time did you give it? I have found 8-10 minutes is the norm for the first boot, and I allow 15 before I concede its not going anywhere.?
Click to expand...
Click to collapse
One difference I have noted between MM and Nougat is that MM will play the boot animation for much shorter a time and go into the "Optimizing app 1 of XX", while Nougat will continue to play the boot animation all through the optimisation (ie a LOOOOONnng time), until it actually loads and displays the launcher. Just a thought, maybe a little hope...
Endless boot screen for me, both with and without GApps. Waited 20 minutes both times. Installed via KKBL TWRP 3.1.1.
I think its safe to say, it will boot loop for everyone.
However, if you wish to possibly see this go further, if someone was to get a log of /proc/kmsg and logcat (and post on hastebin or such, not here), there may be something simple to change. Not that I am going to spend hour and hours on it, but you never know, it may be simple. To know how to get these logs from a non booting computer, you can get the kmsg while TWRP and the logcat maybe using adb over USB. There are plenty of guides on XDA.
DiamondJohn said:
I think its safe to say, it will boot loop for everyone.
However, if you wish to possibly see this go further, if someone was to get a log of /proc/kmsg and logcat (and post on hastebin or such, not here), there may be something simple to change. Not that I am going to spend hour and hours on it, but you never know, it may be simple. To know how to get these logs from a non booting computer, you can get the kmsg while TWRP and the logcat maybe using adb over USB. There are plenty of guides on XDA.
Click to expand...
Click to collapse
Is this still an issue?
DiamondJohn said:
I think its safe to say, it will boot loop for everyone.
However, if you wish to possibly see this go further, if someone was to get a log of /proc/kmsg and logcat (and post on hastebin or such, not here), there may be something simple to change. Not that I am going to spend hour and hours on it, but you never know, it may be simple. To know how to get these logs from a non booting computer, you can get the kmsg while TWRP and the logcat maybe using adb over USB. There are plenty of guides on XDA.
Click to expand...
Click to collapse
Willing to test and post logs. Just not sure how to retrieve the logs.
Not happening
See https://forum.xda-developers.com/showpost.php?p=73567002&postcount=19
Although I would be interested in seeing the last_kmsg log on a KKBL, if anyone has some free time.
As with others, I entered endless bootloop as well. Thank you for making the build to try.
mr3p said:
As with others, I entered endless bootloop as well. Thank you for making the build to try.
Click to expand...
Click to collapse
I am guessing you dont have a log of the last_kmsg :fingers-crossed:?
DiamondJohn said:
I am guessing you dont have a log of the last_kmsg :fingers-crossed:?
Click to expand...
Click to collapse
I apologize for not remembering to save the log. It wouldn't be the end of the world to revert back to KKBL and reload this build to get a log but I'll to find some time to play which is always the challenge.
This wouldn't be a problem so much if Lineage didn't delete perfectly good builds/ROMs for this device when they took over. Why would they do that for this device and not others? That seems a bit too coincidental.
DragonFire1024 said:
This wouldn't be a problem so much if Lineage didn't delete perfectly good builds/ROMs for this device when they took over. Why would they do that for this device and not others? That seems a bit too coincidental.
Click to expand...
Click to collapse
Just curious but if someone wants to run LineageOS, whats the downside of just switching over the to JBBL when builds exist?
mr3p said:
Just curious but if someone wants to run LineageOS, whats the downside of just switching over the to JBBL when builds exist?
Click to expand...
Click to collapse
I can't find working links to downgrade to JBBL

Searching V405EBW owners for TWRP/ROM tests

Hello everyone
Some might know me from the V30... Also got my hands on a V40 now (which I will also give my best to develop for).
I'm currently searching for people who are capable AND willing to test different things.
With that I mean:
- You know how to take logs (logcat, dmesg)
- You know how to recover from a soft brick (either how to get into TWRP for example, or in really bad cases fastboot or flashing a kdz)
- You know how to follow orders
I currently have a (somewhat decendly) working TWRP build (cant decrypt stock encryption atm).
GSIs are a complicated thing, because of not only vbmeta but also because of our 8.1 vendor (Pie GSIs work, if you remove some sepolicies from their system, Oreo GSIs dont have that issue)
What I would need more people to test for:
- stock decryption
- trying out different ways when something (doesnt) boot (e.g. need to flash magisk for xy to not crash to fastboot)
and so on
After everything is somewhat stable (I had to reflash a kdz today, as somehow nothing, no twrp in either slot, or restored stock rom didnt wanna render anything anymore, even though usb/adb worked just fine)
Also working on LOS for this device btw (but thats far more work in progress)
If you wanna be part of this upbringing, reply here, and I'll message you via PM the details.
PS: Having Telegram would be very beneficial.
I volunteer for this. Happy to see you step up for our forgotten device.
How did you reflash the KDZ?
I`m also interested in testing.
onslaught86 said:
How did you reflash the KDZ?
Click to expand...
Click to collapse
In my case i used LG Bridge, at first it complained that MTP wasnt running, but after clicking a few times ok it was fine with that lol
but i read in another thread that a lgup_cmd is able to flash kdzs to the v40
I think I can participate in the test, I have a V405US ROOT phone。
Please forgive me for my bad English. :)
In +1
Hi, how you rooted LG V40?
Any movement on this?
Evilmonstertruck said:
Any movement on this?
Click to expand...
Click to collapse
Camera/Fingerprint have issues so far.
Camera tries to load libraries it has no access to (because treble restrictions, so that also shouldnt work on stock, LG did some tricks there again i guess).
Fingerprint loads, log looks normal (same as on stock) just that it stops at one point without error or anything else.
Would use the prebuilt vendor, if it wouldnt have issues with Pie, thats why im building my own currently.
Other than that, havent had much time in the past 1-1.5 weeks.
SGCMarkus said:
Camera/Fingerprint have issues so far.
Camera tries to load libraries it has no access to (because treble restrictions, so that also shouldnt work on stock, LG did some tricks there again i guess).
Fingerprint loads, log looks normal (same as on stock) just that it stops at one point without error or anything else.
Would use the prebuilt vendor, if it wouldnt have issues with Pie, thats why im building my own currently.
Other than that, havent had much time in the past 1-1.5 weeks.
Click to expand...
Click to collapse
Any update is a good update. I appreciate all the work your doing. I know it's not easy. Thanks again
I can test out twrp and or ROM! Best regards.

[Sofia(p)(r)][Recovery][WIP] TWRP 3.4.0.0

vache said:
Here you go : https://drive.google.com/file/d/1x4t6ca8TLf1bNHrQa-jjCN_AhdV2W78u/view?usp=drivesdk
Boots on sofia (g power), sofiar (g8 power), sofiap (g stylus), sofiap_ao (g pro)
Click to expand...
Click to collapse
I started the thread, but did not make this build. Everything should work. Thank @vache.
Quick update I did get TWRP to build successfully. Unfortunately it just sits on the boot logo but doesn't go back to fastboot, but that was just a quick see what happens build. I haven't added everything I need to yet. Will work on it more tonight, but progress is good so far.
@CodyF86 thanks for taking the lead on porting TWRP to the G Power. The G Power appears to be the best "bang for the buck" phone on the market currently, and has been widely covered by the media so far. I expect that the Moto G Power sub will grow steadily in the upcoming months, leading to custom rom development for the G Power. Having TWRP ported would be a start to paving way for custom rom development.
So another quick little update. I have the device repo basically where it should be...give or take heh. It's changed a bit from what is on my github, but it's pretty close. The only issue i'm having is that compiling it with the minimal manifest isn't going to work. It doesn't compile right. It compiles, but it doesn't copy things over correctly and/or at all depending on what it is.
My repo is pretty close to what the moto one power and the g8 power have, at least for their android 9 device tree, and I can get TWRP to boot, if I use the moto one power image and just dump the moto g power kernel into it.
So short version is i'm downloading the full manifest, basically all of Omni, which should hopefully sort it out. It's downloading right now.
EDIT:
Actually it helps to read the documentation I guess lol.
https://source.android.com/devices/bootloader/system-as-root#using-vendor-overlay
Will keep playing with it.
This is exciting! Thanks for your hard work.
CodyF86 said:
Will keep playing with it.
Click to expand...
Click to collapse
Thank you for taking this on! Having TWRP recovery for "sofia" will really make this phone great!
GoodOlDan said:
Thank you for taking this on! Having TWRP recovery for "sofia" will really make this phone great!
Click to expand...
Click to collapse
I "should" have it working in a day or two...(or even tonight...) The Code Aurora repos have been helping greatly.
https://source.codeaurora.org/quic/la/platform/vendor/qcom/trinket/tree/BoardConfig.mk?h=LA.UM.8.11.r1-03800-NICOBAR.0
Quick question, is the Moto g power the same as Moto g8 power? If they get custom Rom they'll unified? From what I know, the g power is the us variant release of the g8 power, right?. Thx in advance
Been making changes and even trying to repack some files from our devices into chef from when I got chef to boot with a repacked kernel but the touch screen wouldnt work and it couldnt see any partitions really.
Part of the problem seems to be the build system. It's not populating the output image fully. It's not even putting the TWRP directory in there lol.....
Going to keep trying. Going to try to find a native android 10 device that has twrp working unless there isnt one yet. Also our device is a little different it actually puts certain things in /system where in android 9 they went into /vendor. Spent about 3-4 hours on it today, but not going to give up.
I think there is an issue with the OMNI build system though also.
CodyF86 said:
Been making changes and even trying to repack some files from our devices into chef from when I got chef to boot with a repacked kernel but the touch screen wouldnt work and it couldnt see any partitions really.
Part of the problem seems to be the build system. It's not populating the output image fully. It's not even putting the TWRP directory in there lol.....
Click to expand...
Click to collapse
HI, I'd be willing to help with this, I'm a developer, I worked with @tecknight on TWRP for a phone called the Wiko Ride. We never quite got a working TWRP but learned quite a bit about AVB and such. I've already got my Sofia (US unlocked retail, running on Boost Mobile) rooted and could use a new challenge.
I too have been quite baffled by the Android build process at times - the docs that exist seem to assume a LOT of prior knowledge - the barrier to entry seems higher than ordinary Linux kernel hacking by quite a bit.
rlrevell said:
HI, I'd be willing to help with this, I'm a developer, I worked with @tecknight on TWRP for a phone called the Wiko Ride. We never quite got a working TWRP but learned quite a bit about AVB and such. I've already got my Sofia (US unlocked retail, running on Boost Mobile) rooted and could use a new challenge.
I too have been quite baffled by the Android build process at times - the docs that exist seem to assume a LOT of prior knowledge - the barrier to entry seems higher than ordinary Linux kernel hacking by quite a bit.
Click to expand...
Click to collapse
Look at my github you can see the cluster ef of changes I made to at least get to a console. Ironically if you repack the kernel into the chef version of TWRP it boots to the GUI but the touch screen doesnt work.. Our device is weird although it is android 10 native but it has a /system folder. Also on android 10 you can just add things to the vendor partition without using the product partition as an overlay.
Unpack the stock recovery. I went back to the basics and am basically going to mirror the stock recovery then inject the twrp binary, but its weird, the omni build system isnt doing some things correctly it seems also.
This will be your greatest resource. Code Aurora has the answers.
https://source.codeaurora.org/quic/la
https://source.codeaurora.org/quic/la/platform/vendor/qcom/trinket/tree/?h=LA.UM.8.11.r1-03800-NICOBAR.0
https://github.com/codyf86/device_motorola_sofia
LA.UM.8.11.r1-03800-NICOBAR.0 is our current CAF version tree.
Actually I just started the repo over the commits were nasty. Everything important and pertinent is in the initial commit now.
Ive been compiling and hacking kernels for 10 years, building Android for probably the same and this switch to the new partition layout + TWRP has so far been the... I don't want to say hardest but longest thing i've tried to do without any forward movement.
Like I said I got farther just by repacking the our kernel into the moto chef kernel, but they have a system_root directory and we dont. We just have system.
Theyre lib64 goes in /vendor ours goes in /system.
unpack the stock recovery image to start also TWRP uses init.qcom.recovery.rc to do things on the init and init.rc hand off where as stock recovery version of that file is different.
Actually I know partially why it wont boot. I have the paths in the init.recvoery.qcom.rc messed up, but also [email protected] doesn't exist in our lib64/hw directories, but there is a [email protected] file in the stock recovery so going to try that, plus were building bootctrl.trinket.
Nm i found the -service binaries for the boot gatekeeper keymaster libraries etc. think I made some progress but I have to build it and make sure everything gets in the right spot. will keep on keeping on.
The current code I have on my github will boot the stock recovery lol (the build system is being weird)....the build system isn't putting things in the right spot still. I was able to get TWRP to boot by rearranging some things manually, but it isn't pretty. So there is some progress, but the build system is part of the problem at this point at least for android 10. I'm still working on it.
CodyF86 said:
The current code I have on my github will boot the stock recovery lol (the build system is being weird)....the build system isn't putting things in the right spot still. I was able to get TWRP to boot by rearranging some things manually, but it isn't pretty. So there is some progress, but the build system is part of the problem at this point at least for android 10. I'm still working on it.
Click to expand...
Click to collapse
Hey, do you have a telegram account for easier conversing? I feel we might be able to help each other here?(I'm working on sofiar)
Dark98 said:
Hey, do you have a telegram account for easier conversing? I feel we might be able to help each other here(I'm working on sofiar)
Click to expand...
Click to collapse
I can make one and ill dm you.
Here are my questions so far / some observations.
The init.rc that the twrp build system puts in the build is incorrect. It needs to be manually added...I think there is a flag for that actually, but I had to change it once it was built. (I was able to make it boot to the first screen by dropping in things in /sbin from https://github.com/TeamWin/android_device_motorola_chef)
The build system doesn't add the twrpres folder to the built image lol; or the twrp binaries to /sbin.
I literally had to copy them over from chef.
Also for example servicemanager and hardwaremanager aren't in the chef repo but they are in /sbin when you unpack the recovery image (chef), is the build system building them or putting them in from somewhere or are the repos not actually the final product and they had to hack the image a bit too.
I had ours added in then took it out when I couldnt find them in anyones device tree but they are there when you unpack all of the recovery images lol.
edit: It's actually putting most of the stuff (adbd) and symlinks in /system/bin including the recovery bin which is twrp, so let me readjust the init scripts.
our device is different it still has /system and not system_root.
another edit: Looking at android_bootable_recovery/crypto/ex4crypt I think im missing some libraries still.
Okay, if/when you do message me on there please, I hardly check XDA other than when I'm updating a Rom I maintain? @Dark998 is my username
@CodyF86
Interested and surprised to see that twrp for native android 10 is in the works.
After reading Dees Troy's article in late 2019 regarding twrp on android 10, I had resigned myself to the notion that twrp is more or less dead for android 10+...
https://twrp.me/site/update/2019/10/23/twrp-and-android-10.html
Hope you're able to get it working!
Q9Nap said:
@CodyF86
Interested and surprised to see that twrp for native android 10 is in the works.
After reading Dees Troy's article in late 2019 regarding twrp on android 10, I had resigned myself to the notion that twrp is more or less dead for android 10+...
https://twrp.me/site/update/2019/10/23/twrp-and-android-10.html
Hope you're able to get it working!
Click to expand...
Click to collapse
I was absolutely able to get it to boot with adb up but with no touch screen and it couldn't see any paritions, but ive adjusted the fstab file.
Also slightly embarassed to say I repo synced and forgot to drop twrp 10 back in, but i need a libinit with twrp 10 and it actually gave me a couple solutions to that accidentally doing that, accidentally building aosp recovery once time lol xD
CodyF86 said:
I was absolutely able to get it to boot with adb up but with no touch screen and it couldn't see any paritions, but ive adjusted the fstab file.
Also slightly embarassed to say I repo synced and forgot to drop twrp 10 back in, but i need a libinit with twrp 10 and it actually gave me a couple solutions to that accidentally doing that, accidentally building aosp recovery once time lol xD
Click to expand...
Click to collapse
I was thinking that if twrp isn't possible, how difficult would it be to modify stock recovery to remove signature verification?
With stock recovery signature verification disabled, at least side loading would be possible. Thoughts?
Also, I'm willing to help test if needed

[TWRP] A8M Ported Moto One 5G Ace TWRP (An Experimental Work In Progress)

Follow the following at your own risk! I am not responsible for any mishaps with your devices. This will NOT obviously work for Verizon, AT&T, and Cricket phones.
Okay, So I've been asking questions, playing, unpacking, and repacking, trying tools, etc. And I got a very experimental port of TWRP happening. VERY EXPERIMENTAL.
THINGS TO KNOW AFTER THE EXCITEMENT DIES DOWN:
For starters, yes THIS DOES BOOT TO TWRP! I'm quite proud about that. This is my first ever port of anything like this. I mostly just fiddle with making bootable stock roms, and not too much since Android 9 and this new nuts file system. Anyway, I set out to try and get a TWRP together for this phone and that happened, so I'm proud of myself I didn't get discouraged.
Having said that, it has ZERO touchscreen functionality. From my research this was also an initial problem for the peeps over at the Moto One 5G Plus variant (Nairo) before they worked out the bugs. Hopefully they will take mercy on us and come give some feedback.
Also, this is a port. I used @Hovatek's Qualcomm tool to accomplish this since unpacking, repacking, copying and pasting a port from Nairo in the Carliv Image Kitchen or Android Image Kitchen just soft bricked my phone. It also doesn't help the traditional porting methods prior to Android 9 don't work anymore. They came up with a great tool, Gawd Bless Em'.
Should you try this for hoots and giggles just know you will have to hard reset. Android will force a factory reset because of the vbmeta flashing, and your phone will be factory brand spanking new. Backup your contacts, pics, messages, and anything else you want to keep just in case.
I'm not going to put detailed instructions on this just yet since it's experimental - this is really for folks that know what they're doing with their phone.
Notes:
You must have the bootloader unlocked and be rooted with Magisk for this to fly. Can't say how this would work on locked bootloaders without root so proceed cautiously on that.
1. Flash VBmeta first. The VBMeta is a blank file and that's to make sure DM-Verity isn't acting up (which as of now I'm 50% certain it is and that's why I had to go ahead and factory reset). The commands to disbale dm-verity didn't work for me. If anybody knows how to get that shut off please add to the discussion.
2. I didn't replace my original recovery. I just did fastboot boot recovery image to see if it would load. I wouldn't advise flashing it to replace the current recovery as it might seriously bootloop.
If anybody wants to try and work on this with me (or take over since I'm a hobbyist at best) then by all means share. But at least now we're getting somewhere, slowly but surely.
Today was a good day in hacking Android 10 on this phone.
Articul8Madness said:
Follow the following at your own risk! I am not responsible for any mishaps with your devices. This will NOT obviously work for Verizon, AT&T, and Cricket phones.
Okay, So I've been asking questions, playing, unpacking, and repacking, trying tools, etc. And I got a very experimental port of TWRP happening. VERY EXPERIMENTAL.
THINGS TO KNOW AFTER THE EXCITEMENT DIES DOWN:
For starters, yes THIS DOES BOOT TO TWRP! I'm quite proud about that. This is my first ever port of anything like this. I mostly just fiddle with making bootable stock roms, and not too much since Android 9 and this new nuts file system. Anyway, I set out to try and get a TWRP together for this phone and that happened, so I'm proud of myself I didn't get discouraged.
Having said that, it has ZERO touchscreen functionality. From my research this was also an initial problem for the peeps over at the Moto One 5G Plus variant (Nairo) before they worked out the bugs. Hopefully they will take mercy on us and come give some feedback.
Also, this is a port. I used @Hovatek's Qualcomm tool to accomplish this since unpacking, repacking, copying and pasting a port from Nairo in the Carliv Image Kitchen or Android Image Kitchen just soft bricked my phone. It also doesn't help the traditional porting methods prior to Android 9 don't work anymore. They came up with a great tool, Gawd Bless Em'.
Should you try this for hoots and giggles just know you will have to hard reset. Android will force a factory reset because of the vbmeta flashing, and your phone will be factory brand spanking new. Backup your contacts, pics, messages, and anything else you want to keep just in case.
I'm not going to put detailed instructions on this just yet since it's experimental - this is really for folks that know what they're doing with their phone.
Notes:
You must have the bootloader unlocked and be rooted with Magisk for this to fly. Can't say how this would work on locked bootloaders without root so proceed cautiously on that.
1. Flash VBmeta first. The VBMeta is a blank file and that's to make sure DM-Verity isn't acting up (which as of now I'm 50% certain it is and that's why I had to go ahead and factory reset). The commands to disbale dm-verity didn't work for me. If anybody knows how to get that shut off please add to the discussion.
2. I didn't replace my original recovery. I just did fastboot boot recovery image to see if it would load. I wouldn't advise flashing it to replace the current recovery as it might seriously bootloop.
If anybody wants to try and work on this with me (or take over since I'm a hobbyist at best) then by all means share. But at least now we're getting somewhere, slowly but surely.
Today was a good day in hacking Android 10 on this phone.
Click to expand...
Click to collapse
Hi. I appreciate a lot your efforts. I know the feeling when you progress with stuff like this. I'm sorry I have no time in these months to assist. Anyway, I hope you'll manage to go forward with this. Keep up with the good work.
useless789 said:
Hi. I appreciate a lot your efforts. I know the feeling when you progress with stuff like this. I'm sorry I have no time in these months to assist. Anyway, I hope you'll manage to go forward with this. Keep up with the good work.
Click to expand...
Click to collapse
CAn you at least tell me how to port a TWRP on Android 10? Can't find any useful information with the new filetypes.
Articul8Madness said:
CAn you at least tell me how to port a TWRP on Android 10? Can't find any useful information with the new filetypes.
Click to expand...
Click to collapse
I'm not sure what you mean by filetypes. Do you mean the A/B partitions (and the fact that there's no separate recovery partition) or something else?
Articul8Madness said:
Follow the following at your own risk! I am not responsible for any mishaps with your devices. This will NOT obviously work for Verizon, AT&T, and Cricket phones.
Okay, So I've been asking questions, playing, unpacking, and repacking, trying tools, etc. And I got a very experimental port of TWRP happening. VERY EXPERIMENTAL.
THINGS TO KNOW AFTER THE EXCITEMENT DIES DOWN:
For starters, yes THIS DOES BOOT TO TWRP! I'm quite proud about that. This is my first ever port of anything like this. I mostly just fiddle with making bootable stock roms, and not too much since Android 9 and this new nuts file system. Anyway, I set out to try and get a TWRP together for this phone and that happened, so I'm proud of myself I didn't get discouraged.
Having said that, it has ZERO touchscreen functionality. From my research this was also an initial problem for the peeps over at the Moto One 5G Plus variant (Nairo) before they worked out the bugs. Hopefully they will take mercy on us and come give some feedback.
Also, this is a port. I used @Hovatek's Qualcomm tool to accomplish this since unpacking, repacking, copying and pasting a port from Nairo in the Carliv Image Kitchen or Android Image Kitchen just soft bricked my phone. It also doesn't help the traditional porting methods prior to Android 9 don't work anymore. They came up with a great tool, Gawd Bless Em'.
Should you try this for hoots and giggles just know you will have to hard reset. Android will force a factory reset because of the vbmeta flashing, and your phone will be factory brand spanking new. Backup your contacts, pics, messages, and anything else you want to keep just in case.
I'm not going to put detailed instructions on this just yet since it's experimental - this is really for folks that know what they're doing with their phone.
Notes:
You must have the bootloader unlocked and be rooted with Magisk for this to fly. Can't say how this would work on locked bootloaders without root so proceed cautiously on that.
1. Flash VBmeta first. The VBMeta is a blank file and that's to make sure DM-Verity isn't acting up (which as of now I'm 50% certain it is and that's why I had to go ahead and factory reset). The commands to disbale dm-verity didn't work for me. If anybody knows how to get that shut off please add to the discussion.
2. I didn't replace my original recovery. I just did fastboot boot recovery image to see if it would load. I wouldn't advise flashing it to replace the current recovery as it might seriously bootloop.
If anybody wants to try and work on this with me (or take over since I'm a hobbyist at best) then by all means share. But at least now we're getting somewhere, slowly but surely.
Today was a good day in hacking Android 10 on this phone.
Click to expand...
Click to collapse
This is tremendously amazing work. TWRP would be a killer feature with the 5G Ace. Couple that with Lenovo having released the source code, and this forum may get popping again!
useless789 said:
I'm not sure what you mean by filetypes. Do you mean the A/B partitions (and the fact that there's no separate recovery partition) or something else?
Click to expand...
Click to collapse
I was referring to the super_sparsechunk type files that when you look at their "filetype" it has 0 image by its name if its super_sparsechunk.0, 1 if its super_sparsechunk.1 and the like. This is different than the old basic img files that read .img. This is where the learning curve for me kicks in.
Articul8Madness said:
I was referring to the super_sparsechunk type files that when you look at their "filetype" it has 0 image by its name if its super_sparsechunk.0, 1 if its super_sparsechunk.1 and the like. This is different than the old basic img files that read .img. This is where the learning curve for me kicks in.
Click to expand...
Click to collapse
I see. Thanks for the explanation. I'm not sure if this could help, but a quick search on google led me to this (a bit old) video:
I'm really busy until the end of the month so I can't really dedicate my time to this stuff though I would love to.
useless789 said:
I see. Thanks for the explanation. I'm not sure if this could help, but a quick search on google led me to this (a bit old) video:
I'm really busy until the end of the month so I can't really dedicate my time to this stuff though I would love to.
Click to expand...
Click to collapse
I see you already tried this here: Post in thread '[Tool] SparseConverter v1.0.1' https://forum.xda-developers.com/t/tool-sparseconverter-v1-0-1.2749797/post-84767377
If I manage I'll take a look at this asap.
useless789 said:
I see you already tried this here: Post in thread '[Tool] SparseConverter v1.0.1' https://forum.xda-developers.com/t/tool-sparseconverter-v1-0-1.2749797/post-84767377
If I manage I'll take a look at this asap.
Click to expand...
Click to collapse
Any and all contributing help is appreciated!
@Articul8Madness I managed to combine the sparse chunk files into a raw image file. I also managed to mount the image, but only in read-only mode. I'll post with updates as I get passed this obstacle.
Seems the US version of this phone isn't popular enough for dev support...oh well I have R/W access so I was able to delete system app bloatware and I have xposed installed. Stock Reteu firmware is working perfectly on Metro...good luck everybody.. I'm looking for a new 5G phone..
Unfortunately, there are no developers here.
All we can produce is a ported twrp where the touchscreen does not work.
The touchscreen does not work due to problems with the porting tool and the smartphone.
I heard that if you build it from source yourself, it will work.
But I can't find any tutorials for android 10+ and I don't even know what files I need.
PEACH-PIT said:
Unfortunately, there are no developers here.
All we can produce is a ported twrp where the touchscreen does not work.
The touchscreen does not work due to problems with the porting tool and the smartphone.
I heard that if you build it from source yourself, it will work.
But I can't find any tutorials for android 10+ and I don't even know what files I need.
Click to expand...
Click to collapse
I posted the source code. The guys over on the Moto One 5G know what tools you need. I was using Carliv's kitchen to build but I've never built before - they had the same problem as us with the touchscreen and had to make modules. That counts me out because that's above my paygrade, lol.
Articul8Madness said:
I posted the source code. The guys over on the Moto One 5G know what tools you need. I was using Carliv's kitchen to build but I've never built before - they had the same problem as us with the touchscreen and had to make modules. That counts me out because that's above my paygrade, lol.
Click to expand...
Click to collapse
Not entirely sure what you mean. If your doing some kind of frankenstein recovery, I'm sure you just failed to copy some module or firmware, obviously the ts works in the official software.
1.) Find out what touchscreen chipset your device uses (you can use kernel log or system info apps or whatever)
2.) Determine which kernel module supports it (all modules built will be in your kernel config)
3.) modprobe that module from adb in your recovery. If it doesn't just work, you will receive some error on the command line or dmesg that you can use to fix it. Could need a configuration file or something, idk. It's likely an opensource module that you can read through and I bet you can find specific info online since your not the first to hit this issue.
If your wondering how to build the kernel, I can help a little, but it's incomplete:
Kernel source:
GitHub - MotorolaMobilityLLC/kernel-msm at MMI-QZK30.Q4-40-52
Linux Kernel for Motorola devices using MSM-based chipset - GitHub - MotorolaMobilityLLC/kernel-msm at MMI-QZK30.Q4-40-52
github.com
Build instructions:
readme/MMI-QPN30.33-40.txt at master · MotorolaMobilityLLC/readme
Readme's for motorola builds. Contribute to MotorolaMobilityLLC/readme development by creating an account on GitHub.
github.com
Snapdragon LLVM Toolchain:
snapdragon-llvm-8.0.6-linux64.tar.gz
drive.google.com
Retail config is on your device:
/proc/config.gz
The instructions don't cover the qcom toolchain, you just take the files here:
snapdragon-llvm-8.0.6-linux64.tar.gz/toolchains/llvm-Snapdragon_LLVM_for_Android_8.0/prebuilt/linux-x86_64/*
and place them here:
$my_top_dir/vendor/qcom/proprietary/llvm-arm-toolchain-ship/8.0/
When building, skip the cat command, and place your config manually to $kernel_out_dir/.config
The step I haven't done is build a device tree. It's not that it's too difficult, I just haven't put in the time required to do it. It's not strictly necessary to achieve for my goals since I only wanted modules and know how to patch the kernel to be able to use them.
https://github.com/moto-sm7250/android_device_motorola_kiev/tree/android-10
Will this not work?
I do not know how to build it.
fddm said:
Not entirely sure what you mean. If your doing some kind of frankenstein recovery, I'm sure you just failed to copy some module or firmware, obviously the ts works in the official software.
1.) Find out what touchscreen chipset your device uses (you can use kernel log or system info apps or whatever)
2.) Determine which kernel module supports it (all modules built will be in your kernel config)
3.) modprobe that module from adb in your recovery. If it doesn't just work, you will receive some error on the command line or dmesg that you can use to fix it. Could need a configuration file or something, idk. It's likely an opensource module that you can read through and I bet you can find specific info online since your not the first to hit this issue.
If your wondering how to build the kernel, I can help a little, but it's incomplete:
Kernel source:
GitHub - MotorolaMobilityLLC/kernel-msm at MMI-QZK30.Q4-40-52
Linux Kernel for Motorola devices using MSM-based chipset - GitHub - MotorolaMobilityLLC/kernel-msm at MMI-QZK30.Q4-40-52
github.com
Build instructions:
readme/MMI-QPN30.33-40.txt at master · MotorolaMobilityLLC/readme
Readme's for motorola builds. Contribute to MotorolaMobilityLLC/readme development by creating an account on GitHub.
github.com
Snapdragon LLVM Toolchain:
snapdragon-llvm-8.0.6-linux64.tar.gz
drive.google.com
Retail config is on your device:
/proc/config.gz
The instructions don't cover the qcom toolchain, you just take the files here:
snapdragon-llvm-8.0.6-linux64.tar.gz/toolchains/llvm-Snapdragon_LLVM_for_Android_8.0/prebuilt/linux-x86_64/*
and place them here:
$my_top_dir/vendor/qcom/proprietary/llvm-arm-toolchain-ship/8.0/
When building, skip the cat command, and place your config manually to $kernel_out_dir/.config
The step I haven't done is build a device tree. It's not that it's too difficult, I just haven't put in the time required to do it. It's not strictly necessary to achieve for my goals since I only wanted modules and know how to patch the kernel to be able to use them.
Click to expand...
Click to collapse
This recovery I built in this thread I used Hovatek's tool to do. I have never built a recovery and I was hoping if someone got the ball rolling we could get a dev to jump in. That hasn't happened.
The guys with the other variant of this phone said they had to create modules. Go to the Moto One 5G forums and see the thread. They had the same problems too, but they had more dev support than we do.
I have never built a TWRP, let alone from source, so half of what you sent I have no idea what it is or how to decompile it (yet).
I have posted the entire Kernel Motorola released its in the other thread. The Device Tree is official and out on github.
Guys, I'm a developer, just that I'm still really busy. I'm following your posts and have looked into some of the stuff, just I'm proceeding slowly due to lack of time. I'll post as soon as I have something working.
useless789 said:
Guys, I'm a developer, just that I'm still really busy. I'm following your posts and have looked into some of the stuff, just I'm proceeding slowly due to lack of time. I'll post as soon as I have something working.
Click to expand...
Click to collapse
Is this the correct twrp for this phone?
Root Motorola One 5G Ace XT2113 and Install TWRP Recovery 3.5.0
Easy tutorial to Root Motorola One 5G Ace XT2113-2, XT2113-3, XT2113-5 easily. For rooting, you have to flash TWRP Recovery 3.5.0 on Android 10 through guide.
www.androidweblog.com
Later guys, keep up the good work
Tomspector said:
Is this the correct twrp for this phone?
Root Motorola One 5G Ace XT2113 and Install TWRP Recovery 3.5.0
Easy tutorial to Root Motorola One 5G Ace XT2113-2, XT2113-3, XT2113-5 easily. For rooting, you have to flash TWRP Recovery 3.5.0 on Android 10 through guide.
www.androidweblog.com
Later guys, keep up the good work
Click to expand...
Click to collapse
This is a fake. It's non-functional garbage.
There is no harm in trying it, unless you flash it, but there is no need to try it.
useless789 said:
Guys, I'm a developer, just that I'm still really busy. I'm following your posts and have looked into some of the stuff, just I'm proceeding slowly due to lack of time. I'll post as soon as I have something working.
Click to expand...
Click to collapse
I have a request to the developers.
GitHub - moto-sm7250/android_device_motorola_kiev at android-10
DT for Moto G 5G / One 5G Ace. Contribute to moto-sm7250/android_device_motorola_kiev development by creating an account on GitHub.
github.com
Can you please build this twrp?
I'm trying to build it.
But I don't know how to solve the error.
I don't think I can build it.

Categories

Resources