First up, shoutouts to both @phhusson and part of this thread from @YOisuPU for vital guidance throughout my first journey with super-partition devices.
A51 5G runs on Exynos 980 unlike the 4G variant which runs on Exynos 9611. People have been running into trouble rooting the 4G variant and even resorted to GSIs just for rooting, but on the 5G variant all you had to do is to patch boot+vbmeta (don't include recovery) with Magisk. If you just need root, stopping here is enough.
For me, running my LOS GSI is absolutely necessary, but Android 10's super-partition compounded with Samsung not making fastbootd available means an even harder time than what I've had with A60/M40. Below steps apply to this device and might also serve as a general skeleton for other Samsung devices with super-partition.
0) Get Linux - some tools used here just don't have a Windows version
1) On stock firmware, open shell and run
Code:
lpdump
to get some partition info that'll be used next - example output here
2) Get stock firmware
3) Extract super.img.lz4 from AP and then super.img (sparse) from super.img.lz4 with your tool of choice (e.g. 7-Zip ZS)
4) Unsparse super.img:
Code:
./simg2img super.img super.raw.img
5) Extract partitions from super.raw.img:
Code:
./lpunpack --slot=0 super.raw.img <dir>
6) Replace system.img in <dir> with GSI image
7) Repack your own super.img:
Code:
./lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --device super:7549747200 --group main:7545552896 --partition system:readonly:2147483648:main --image system=./system.img --partition vendor:readonly:729890816:main --image vendor=./vendor.img --partition odm:readonly:4349952:main --image odm=./odm.img --sparse --output ./super.img
Compare the command to the lpdump output obtained earlier - many of the numerical parameters here directly match. For the 3 partition declarations, assign them sizes equal to or larger than (recommended) their byte sizes.
8) Compress your super.img into a tar and flash it via Odin in the AP slot
9) Make sure that the device runs patched vbmeta (but stock boot image - somehow the patched one causes a bootloop on GSIs), do a factory reset in stock recovery, reboot
simg2img, lpunpack and lpmake binaries can be obtained online (e.g. from the aforementioned thread) or built from source.
By the way, I've fixed some sepolicy issues with PHH's Superuser, so in future builds, unlike what was described in the thread, 4G variant users likely won't need a permissive kernel to get root on GSIs (at least it doesn't here).
When i lpmake i get invalid sparse image header
blackbuga said:
When i lpmake i get invalid sparse image header
Click to expand...
Click to collapse
Can be safely ignored.
AndyYan said:
Can be safely ignored.
Click to expand...
Click to collapse
"Patched vbmeta.img " where can I find this or is it patched by magisk im assuming
I'm unsure where you are getting the sizes for the partitions, could you please elaborate on that? The rest is self explanatory.
PizzaG said:
I'm unsure where you are getting the sizes for the partitions, could you please elaborate on that? The rest is self explanatory.
Click to expand...
Click to collapse
Sub-partition sizes are arbitrary, as long as they can contain the respective content (e.g. system has to be larger than your GSI) while still fit inside super.
blackbuga said:
When i lpmake i get invalid sparse image header
Click to expand...
Click to collapse
其他型号的手机修改super.img 最后打包的时候也可以使用么? lpmake 这个文件提取到system.img同目录执行?还是在复制system.img文件到otg\bin文件夹下执行?
并不很明白 ./lpmake ....命令各个参数的意思。
---------- Post added at 02:19 AM ---------- Previous post was at 02:16 AM ----------
lpmake这个文件提取到system.img同目录执行?还是在复制system.img文件到otg \ bin文件夹下执行?
并不很明白。 / lpmake ....命令各个参数的意思。
lpmake文件提取到system.img同目录执行命令后 出现了错误.
AndyYan said:
Sub-partition sizes are arbitrary, as long as they can contain the respective content (e.g. system has to be larger than your GSI) while still fit inside super.
Click to expand...
Click to collapse
-metadata-size 65536 65536 Does the number represent partition size or permissions? Will the numbers never change?
-metadata-slots 2 The slots2 parameter will never change?
-device super:7549747200 Does this number represent the total generation of the super partition?
-group main:7545552896 What does the back number mean? The total size of the other three partitions?
Thank you
lkj00 said:
lpmake文件提取到system.img同目录执行命令后 出现了错误.
Click to expand...
Click to collapse
That's because lpmake has supporting libraries. Call lpmake by its original path.
lkj00 said:
-metadata-size 65536 65536 Does the number represent partition size or permissions? Will the numbers never change?
-metadata-slots 2 The slots2 parameter will never change?
-device super:7549747200 Does this number represent the total generation of the super partition?
-group main:7545552896 What does the back number mean? The total size of the other three partitions?
Click to expand...
Click to collapse
Check your own lpdump result for all these parameters.
AndyYan said:
That's because lpmake has supporting libraries. Call lpmake by its original path.
Check your own lpdump result for all these parameters.
Click to expand...
Click to collapse
通过执行上面命令最后得到这样错误提示 ?
Invalid sparse file format at header magic
lkj00 said:
通过执行上面命令最后得到这样错误提示 ?
Invalid sparse file format at header magic
Click to expand...
Click to collapse
At least read above?
AndyYan said:
Can be safely ignored.
Click to expand...
Click to collapse
AndyYan said:
At least read above?
Click to expand...
Click to collapse
了解 谢谢
Success!
I flashed several GSI roms on A51 4G (exynos) using this method.
Thank you for your good work!
Thanks, flashed lineage on my A71 5g
:good:
I'm very much obliged to you! Test other brands as common! !
lkj00 said:
I'm very much obliged to you! Test other brands as common! !
Click to expand...
Click to collapse
Most if not all other brands leave fastbootd intact, eliminating the need for this set of procedure.
AndyYan said:
Most if not all other brands leave fastbootd intact, eliminating the need for this set of procedure.
Click to expand...
Click to collapse
Hmm! Mainly flexible. For example, my brand division does not have the "odm" division, and replace it with my own division "product". That's it.
@AndyYan thank you so much for writing this detailed guide.
Thanks to your detailed guide I was able to create an automated bash script that performs all of these steps automatically and makes all read only partitions inside super.img (system, vendor , product, etc...) into read write-able partitions again and flash to device as a brand new super.img.
It would be an honor for me if you could please try it and let me know if it works on your device. Thanks.
Here is the link:
https://forum.xda-developers.com/t/script-mount-system-as-read-write-android-10.4240703/
lebigmac said:
It would be an honor for me if you could please try it and let me know if it works on your device. Thanks.
Click to expand...
Click to collapse
Aww, sold my A51 just yesterday...
AndyYan said:
First up, shoutouts to both @phhusson and part of this thread from @YOisuPU for vital guidance throughout my first journey with super-partition devices.
A51 5G runs on Exynos 980 unlike the 4G variant which runs on Exynos 9611. People have been running into trouble rooting the 4G variant and even resorted to GSIs just for rooting, but on the 5G variant all you had to do is to patch boot+vbmeta (don't include recovery) with Magisk. If you just need root, stopping here is enough.
For me, running my LOS GSI is absolutely necessary, but Android 10's super-partition compounded with Samsung not making fastbootd available means an even harder time than what I've had with A60/M40. Below steps apply to this device and might also serve as a general skeleton for other Samsung devices with super-partition.
0) Get Linux - some tools used here just don't have a Windows version
1) On stock firmware, open shell and run
Code:
lpdump
to get some partition info that'll be used next - example output here
2) Get stock firmware
3) Extract super.img.lz4 from AP and then super.img (sparse) from super.img.lz4 with your tool of choice (e.g. 7-Zip ZS)
4) Unsparse super.img:
Code:
./simg2img super.img super.raw.img
5) Extract partitions from super.raw.img:
Code:
./lpunpack --slot=0 super.raw.img <dir>
6) Replace system.img in <dir> with GSI image
7) Repack your own super.img:
Code:
./lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --device super:7549747200 --group main:7545552896 --partition system:readonly:2147483648:main --image system=./system.img --partition vendor:readonly:729890816:main --image vendor=./vendor.img --partition odm:readonly:4349952:main --image odm=./odm.img --sparse --output ./super.img
Compare the command to the lpdump output obtained earlier - many of the numerical parameters here directly match. For the 3 partition declarations, assign them sizes equal to or larger than (recommended) their byte sizes.
8) Compress your super.img into a tar and flash it via Odin in the AP slot
9) Make sure that the device runs patched vbmeta (but stock boot image - somehow the patched one causes a bootloop on GSIs), do a factory reset in stock recovery, reboot
simg2img, lpunpack and lpmake binaries can be obtained online (e.g. from the aforementioned thread) or built from source.
By the way, I've fixed some sepolicy issues with PHH's Superuser, so in future builds, unlike what was described in the thread, 4G variant users likely won't need a permissive kernel to get root on GSIs (at least it doesn't here).
Click to expand...
Click to collapse
It may sound stupid, but how do I get the lp command tools?
---
DISCLAIMER
The code published here is in a very early stage of development, and was published with the intention of receiving comments that allow me to improve it and develop a more stable version, it is not a software created with the intention that you install it on your device, much less on a different device, therefore, I am not responsible of dead or unusable devices.
I will not mention other users directly until I have finished this project, they will all appear in a list at the beginning of the publication where the final version will be
---
Project status: Starting over from 0.
I apologize for the delay, the protests in my country caused a compression of the university calendar to compensate for the lost time, the holidays officially began on December 17.
Here's a long and unnecessary context where I explain why I am doing this, you can skip it:
I recently changed the motherboard of my 5-year-old Yoga Tab 3, because it's still a good tablet, at least for seeing Netflix with a great audio quality, after replacing the old damaged card for a new one and flashing a clean version of android L with QFIL, I opened the task manager and saw [500MB of 1GB memory available], so I said “Wow, this is still great! If only I could have these numbers in a more modern version of android...”.
Android M is no longer usable in this tablet, the 32-bit processor equipped with 4 cores at 1.3ghz has aged very badly and the Android M experience has become terribly slow, so, updating the tablet is not an option.
But at that point, I remembered that for a while I used a phone with Android Oreo (Go Edition) out of the box, and personally I must say that I really enjoyed the experience. So, I looked at the little APQ8009 chip on my old and damaged motherboard, reasoned for a moment, and I said to myself: Why not?
I took my cell phone and searched "MSM8909 android oreo go" to see if anyone on XDA or another site had tried to develop something similar, but what I found was even more surprising:
The Lenovo Tab E10 (tb-x104f), a 10.1-inch tablet equipped with an MSM8909 processor, 1GB of RAM and 16GB of ROM and a screen resolution of 1280x800 (exactly the same specifications than the YOGA Tab 3!), and most importantly, Android Oreo (Go Edition) out of the box.
I never thought Lenovo would recycle their old plattforms to make new products, but they did it, and obviously this was an opportunity that I couldn't pass up.
This is my first post here, I hope to be welcome.
1) Original process, you might want to skip this point, I basically tried to port the ROM directly from the TB-X104F model (bad idea!):
- I downloaded two versions of the YT3-850F_S000025_151016 compilation of the YOGA Tab 3 from firmware247, one of them is OTA and the other is for flashing with QFIL.
- I downloaded the TB-X104F_S100050_200813 compilation of the E10 Tab from lolinet mirrors (QPST version)
This is because only QPST versions have been released for TB-X104F and not OTA versions, so I decided that I would get the system folder from the QPST files from both ROMs and not from the OTA files, but also, I needed the 850F OTA ROM to get an idea of what an X104F OTA ROM would look like, since I could try to rebuild it using files from the QPST version (which worked out very well).
To do that, I used two tools called packsparseimg and Imgextractor, developed by the members kidd (or kiddlu) and and_pDA, then published by Innfinite4evr and finally republished by the member zround, apparently this tool is no longer available on XDA, but I found it on a page called CaraRoot.
Here is a list with all the changes applied following the guide of The Hard Gamer and mshoaib7, I will highlight the important points.
(This guide was intended for porting Nougat roms, but I suppose it should work just as well for Oreo roms.)
- The META-INF folder did not exist in the rebuilt target rom so it was just copied from the base rom as the guide indicates.
- There is also no recovery folder, it was skipped.
- BIN, ETC, TTS, USR, XBIN and recovery-from-boot.p of the system folder were replaced by those of the base rom (ADDON.D does not exist in any of the 2).
- DRM, HW and SOUNDFX folders were replaced in the lib folder, inside system.
- All files named with LIBGLES*, LIBMM*, LIBHARDWARELEGACY, LIBRIL, LIBRILUTILS and LIBCAMERA* were replaced in the lib folder (there is no file named libwcnss_qmi, it was skipped).
- All files named with libactuator*, libchromatix*, libmmcamera*, libril*, liboemcamera and libimscamera were replaced in lib folder, inside vendor.
- The build.prop file of the target rom was replaced by the base rom file.
The following lines were modified:
ro.build.display.id=YT3-850F_OREO
ro.build.version.incremental=YT3-850F_OREO
ro.build.version.sdk=27
ro.build.version.preview_sdk=0
ro.build.version.codename=REL
ro.build.version.all_codenames=REL
ro.build.version.release=8.1.0
ro.build.version.security_patch=2020-08-05
ro.build.version.base_os=
(...)
ro.build.date=Thu Aug 13 16:55:25 CST 2020
ro.build.date.utc=1597308925
(...)
ro.build.flavor=hq_msm8909go-user
(...)
ro.product.ota.model=
(...)
#
# from device/huaqin/hq_msm8909go/system.prop
#
#
# system.prop for msm8909go
#
The following lines were not modified due to the paragraph that precedes them, I'm sure that not changing this will cause problems, but I don't know what else to do:
# Do not try to parse description, fingerprint, or thumbprint
ro.build.description=msm8909-user 5.1.1 LMY47V 387 release-keys
ro.build.fingerprint=Lenovo/YT3-850F/YT3-850F:5.1.1/LMY47V/YT3-850F_USR_S025_151016_Q1241_ROW:user/release-keys
ro.build.characteristics=tablet
ro.build.phonenumber.minmatch=
ro.build.network.type=wcdma_gsm
ro.build.water.mark=
ro.build.dulemode=
ro.hardware.version=60
ro.build.custom.swversion=YT3-850F_151016
ro.build.custom.hwversion=LenovoPad YT3-850F
and the following lines were not copied, but I'm curious to know what will happen if I do, comment below...
#
# ADDITIONAL_BUILD_PROPERTIES
#
ro.treble.enabled=true
- The boot.img was also modified, the changes were applied.
Additional changes that were not in the guide:
The splash.img, emmc_appsboot, rpm, sbl1 and tz files of the target rom were copied from the QPST folder to the rebuilt OTA folder.
¿Why? Because this is how they appear in the base ROM, I assumed they are necessary files, and the target ROM should have them too.
Also here are some files that the base rom has and the target rom doesn't:
file_contexts
NON-HLOS
data.new.dat
data.patch.dat
system.patch.dat
data.transfer.list
I also thought to include the recovery.img, but that would remove TWRP.
2) The current process:
- Install Ubuntu
- Create a working directory
- Download the Android Oreo source code and if possible Oreo Go directly and combine it with the Lenovo source code (which contains everything related to hardware).
- Compile and test.
3) The files.
Here you will find a direct access to my drive, where you will find everything related to the project.
Project Yoga Tab 3 Oreo
That way and if you are interested in collaborating, you can do more things with them and post your recommendations in this thread. Also don't forget that below you can let me know if I forgot to do something, or if there is anything else I need to do before trying to flash this on my new motherboard.
I hope you liked this work.
With the college exams so close, I hope it won't be long until I post an update at least.
See you soon!
SomeoneNormal07 said:
---
DISCLAIMER
The code published here is in a very early stage of development, and was published with the intention of receiving comments that allow me to improve it and develop a more stable version, it is not a software created with the intention that you install it on your device, much less on a different device, therefore, I am not responsible of dead or unusable devices.
I will not mention other users directly until I have finished this project, they will all appear in a list at the beginning of the publication where the final version will be
---
Here's a long and unnecessary context where I explain why I am doing this, you can skip it:
I recently changed the motherboard of my 5-year-old Yoga Tab 3, because it's still a good tablet, at least for seeing Netflix with a great audio quality, after replacing the old damaged card for a new one and flashing a clean version of android L with QFIL, I opened the task manager and saw [500MB of 1GB memory available], so I said “Wow, this is still great! If only I could have these numbers in a more modern version of android...”.
Android M is no longer usable in this tablet, the 32-bit processor equipped with 4 cores at 1.3ghz has aged very badly and the Android M experience has become terribly slow, so, updating the tablet is not an option.
But at that point, I remembered that for a while I used a phone with Android Oreo (Go Edition) out of the box, and personally I must say that I really enjoyed the experience. So, I looked at the little APQ8009 chip on my old and damaged motherboard, reasoned for a moment, and I said to myself: Why not?
I took my cell phone and searched "MSM8909 android oreo go" to see if anyone on XDA or another site had tried to develop something similar, but what I found was even more surprising:
The Lenovo Tab E10 (tb-x104f), a 10.1-inch tablet equipped with an MSM8909 processor, 1GB of RAM and 16GB of ROM and a screen resolution of 1280x800 (exactly the same specifications than the YOGA Tab 3!), and most importantly, Android Oreo (Go Edition) out of the box.
I never thought Lenovo would recycle their old plattforms to make new products, but they did it, and obviously this was an opportunity that I couldn't pass up.
This is my first post here, I hope to be welcome.
1) Preparing the ROMs to work.
- I downloaded two versions of the YT3-850F_S000025_151016 compilation of the YOGA Tab 3 from firmware247, one of them is OTA and the other is for flashing with QFIL.
- I downloaded the TB-X104F_S100050_200813 compilation of the E10 Tab from lolinet mirrors (QPST version)
This is because only QPST versions have been released for TB-X104F and not OTA versions, so I decided that I would get the system folder from the QPST files from both ROMs and not from the OTA files, but also, I needed the 850F OTA ROM to get an idea of what an X104F OTA ROM would look like, since I could try to rebuild it using files from the QPST version (which worked out very well).
To do that, I used two tools called packsparseimg and Imgextractor, developed by the members kidd (or kiddlu) and and_pDA, then published by Innfinite4evr and finally republished by the member zround, apparently this tool is no longer available on XDA, but I found it on a page called CaraRoot.
2) A list with all the changes applied following the guide of The Hard Gamer and mshoaib7, I will highlight the important points.
(This guide was intended for porting Nougat roms, but I suppose it should work just as well for Oreo roms.)
- The META-INF folder did not exist in the rebuilt target rom so it was just copied from the base rom as the guide indicates.
- There is also no recovery folder, it was skipped.
- BIN, ETC, TTS, USR, XBIN and recovery-from-boot.p of the system folder were replaced by those of the base rom (ADDON.D does not exist in any of the 2).
- DRM, HW and SOUNDFX folders were replaced in the lib folder, inside system.
- All files named with LIBGLES*, LIBMM*, LIBHARDWARELEGACY, LIBRIL, LIBRILUTILS and LIBCAMERA* were replaced in the lib folder (there is no file named libwcnss_qmi, it was skipped).
- All files named with libactuator*, libchromatix*, libmmcamera*, libril*, liboemcamera and libimscamera were replaced in lib folder, inside vendor.
- The build.prop file of the target rom was replaced by the base rom file.
The following lines were modified:
ro.build.display.id=YT3-850F_OREO
ro.build.version.incremental=YT3-850F_OREO
ro.build.version.sdk=27
ro.build.version.preview_sdk=0
ro.build.version.codename=REL
ro.build.version.all_codenames=REL
ro.build.version.release=8.1.0
ro.build.version.security_patch=2020-08-05
ro.build.version.base_os=
(...)
ro.build.date=Thu Aug 13 16:55:25 CST 2020
ro.build.date.utc=1597308925
(...)
ro.build.flavor=hq_msm8909go-user
(...)
ro.product.ota.model=
(...)
#
# from device/huaqin/hq_msm8909go/system.prop
#
#
# system.prop for msm8909go
#
The following lines were not modified due to the paragraph that precedes them, I'm sure that not changing this will cause problems, but I don't know what else to do:
# Do not try to parse description, fingerprint, or thumbprint
ro.build.description=msm8909-user 5.1.1 LMY47V 387 release-keys
ro.build.fingerprint=Lenovo/YT3-850F/YT3-850F:5.1.1/LMY47V/YT3-850F_USR_S025_151016_Q1241_ROW:user/release-keys
ro.build.characteristics=tablet
ro.build.phonenumber.minmatch=
ro.build.network.type=wcdma_gsm
ro.build.water.mark=
ro.build.dulemode=
ro.hardware.version=60
ro.build.custom.swversion=YT3-850F_151016
ro.build.custom.hwversion=LenovoPad YT3-850F
and the following lines were not copied, but I'm curious to know what will happen if I do, comment below...
#
# ADDITIONAL_BUILD_PROPERTIES
#
ro.treble.enabled=true
- The boot.img was also modified, the changes were applied.
3) Additional changes that were not in the guide.
The splash.img, emmc_appsboot, rpm, sbl1 and tz files of the target rom were copied from the QPST folder to the rebuilt OTA folder.
¿Why? Because this is how they appear in the base ROM, I assumed they are necessary files, and the target ROM should have them too.
Also here are some files that the base rom has and the target rom doesn't:
file_contexts
NON-HLOS
data.new.dat
data.patch.dat
system.patch.dat
data.transfer.list
I also thought to include the recovery.img, but that would remove TWRP.
4) The files.
this link should give you access to the folder on my drive where the 3 zip files are, the two base roms and the resulting oreo rom.
Project Yoga Tab 3 Oreo
That way and if you are interested in collaborating, you can do more things with them and post your recommendations in this thread. Also don't forget that below you can let me know if I forgot to do something, or if there is anything else I need to do before trying to flash this on my new motherboard.
I hope you liked this work.
With the college exams so close, I hope it won't be long until I post an update at least.
See you soon!
Click to expand...
Click to collapse
Hello looking forward to helping you in this project, as i do not know much about compiling android roms but as i own this device and been looking internet about any new rom or a way that we can still use this tablet
jimmy619 said:
Hello looking forward to helping you in this project, as i do not know much about compiling android roms but as i own this device and been looking internet about any new rom or a way that we can still use this tablet
Click to expand...
Click to collapse
You are welcome to help, although I don't know much about teamwork (especially online).
Ok, today I just installed this version with TWRP and surprise! Dead device!
(Revived with QFIL in an instant.)
With this experience I confirmed that I have definitely forgotten something...
SomeoneNormal07 said:
Ok, today I just installed this version with TWRP and surprise! Dead device!
(Revived with QFIL in an instant.)
With this experience I confirmed that I have definitely forgotten something...
Click to expand...
Click to collapse
I'll put a bit of context:
At the end, I have modified the lines that in the post I said that I did not want to modify, maybe that caused the problem or contributed to it, in any case, I will repeat the experiment and be more careful with what I touch in buildprop.
Ok, there are bad news.
Based on the unformation I was reading, I was committing a huge hazing, it seems that porting a stock ROM to a device with another stock ROM is not a good idea at all, instead I should use an AOSP rom as a target, and last but not least, I'm trying to run android Oreo on this thing.
There is a lot of information out there about how the functioning of android changed with the arrival of Treble, on the one hand, there are those who say that porting ROMs from one device to another has become much easier with Treble, and it is true, but mainly for the devices that already support Treble, for the rest of the devices (as this tablet), that will be more complicated.
My hopes are now based on a comment from an XDA member with a tb-X104F claiming to have flashed Lineage OS 15.1 and another member claiming to have flashed Resurrection Remix, both are different Roms than stock so I should be able to use one of them as a base.
My questions now are:
Do I need a copy of the rom already installed on your devices to work on it or will it be enough to just download the generic image of Lineage OS / Resurrection Remix?
Will the port to android Oreo work or do I need to add files to ROM?
(I hope I have enough time on vacation to investigate all of this)
Then, I must create an update script, (which the Lollipop firmware has but does not say anything that it should say, also the Oreo firmware does not have one because there is not a Meta-Inf folder, my last hope is to find a updater script in the Marshmallow firmware)
Finally, something very strange happens with version 2.8.7.7 of TWRP, and it is that no matter how hard I try, I cannot get it to install a different ROM than the official one, it install applications, install other recovery images, but don't install roms, no matter what I do, I actually tried modifying a few things in the stock ROM to see if those changes applied, and guess what, they don't! the system image is still intact, so now I feel pretty lost.
So, following the tutorials for this tablet, I will have to install Marshmallow and flash the modern version of TWRP (dark theme with blue) available for this tablet and try this again.
Extra: the last files I added weren't necessary either, what's more, I surely came close to ruining my tablet with that flash, I just need the Meta-Inf, system files, apparently a folder called install (which I can't find anywhere but surely contains apps or something like this), a recovery folder (which would delete TWRP but I suppose it is necessary), the boot.img (the only thing that seems to have been done right) and finally the file_contexts.bin file (from I don't know which of the 2 tablets).
Ok guys, some things happened in the short time since i published the last update, I found the solution to the problem with TWRP (SPOILER: another huge hazing).
Along the way I learned a bit about how to write updater-scripts, and now I have a 100% flashable file, the problem now is that the OS does not load and it returns me to TWRP.
But I haven't given up yet, I'll keep working in this until it works.
Now I would like to dig a little more into the hardware files, bloatware and how Lenovo's signature and security work.
the file was android 5 wtf
If you mean the yt3-850f file in the folder, that's android 5.1.1
Excuse me, I deleted the oreo file as soon as I realized my mistake, a new file will be available in a while with a changelog.
SomeoneNormal07 said:
If you mean the yt3-850f file in the folder, that's android 5.1.1
Excuse me, I deleted the oreo file as soon as I realized my mistake, a new file will be available in a while with a changelog.
Click to expand...
Click to collapse
thanks
btw do you have a lineage os rom for the m model or is it possible to compile this to the "m" model?
(as in yt-850m)
Ok guys, here are some news.
I am completely sure that this thing will start, even so, I have prepared an alternative, in this link you will find some downloads of Lineage GSIs, the version "ARM32 A-only device with Android Go gapps" as I am reading inside the build.prop was made to work with 32-bit systems.
Now, as I have been researching and also testing on my own on this device, what we now need is a COMPILED KERNEL FOR THIS DEVICE that can run the ROM, since with the boot.img files and Android Image Kitchen for Windows 10 I am not able to get it to work in any way, so I will have to compile the kernel from 0, at first this may sound complicated, but luckily Lenovo published all the source code for both devices (for Linux), apparently including all the hardware files required for both boards on their support website.
So next on my to-do list is compiling the kernel, but here's when the bad news comes:
College is getting a bit heavy now, so I'll take a break from this project to put 100% of my attention on the exams.
But don't worry, before that, I have updated the project folder with new files, and also, I have prepared the next notes for you:
Through experimentation and research, I have learned how the android update works, here are some notes for other newbies on this topic.
As we already know, android is updated using a file called updater-script, found in /META-INF/com/google/android, in modern versions of this file (Android 5 onwards) we can find the following line:
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file ("system.transfer.list"), "system.new.dat", "system.patch.dat");
This is the line responsible for updating the system, it is a very simple method, and that is why I will adopt it to launch the rom, it is very important to have the 3 files that this code mentions in the ROM, otherwise, the system files will not be copied (TWRP will skip any command with missing files.)
The system.new.dat file can be created from our system folder using 2 Tools:
- The first one is Tool Unpack Repack 3.0, but I do not recommend it very much since the way it is made only allows you to directly convert .img files into .dat, and not a system folder directly to .dat, this happens because instead to unzip the rom directly to a folder that you can modify, the tool store the files for recompression in a hidden file called new.system.img, also the program should include a tutorial where it tells you that the size of the final image must be the same as the file in /System_Unpack/temp_working/new.system.img, because I spent about half an hour looking for the correct size.
- The second tool is IMG extractor, which in addition to creating .dat files can also create .img files that you can convert to .dat with the first tool in case you get an error with it, this tool is included with another program called Brotli Extractor.
To create system.new.dat, you need to have file_contexts from the /boot.img/ramdisk of the ROM you are building, and the system.transfer.list (you can find one in the update_files.zip), once the system.new.dat has been created, a new system.transfer.list should appear next to it, you must copy and replace this file in your ROM.
The Lollipop ROM has provided me a 0 byte system.patch.dat file, the sole purpose of which here is to allow the line of code to run, since there is nothing to patch.
Also, in the project folder you will find:
- Source code of both devices (the code of the tb-x104f is of the normal Oreo version, not Oreo go).
- ROMs (these are not flash files, you need to convert the system folder to .dat and add the META-INF folder and the patch and list files).
- Unzipped boot.img from both devices (Android L and M come from the YT3).
- system_test.zip, which is the image that I am trying to run (this time I used android 6 as a base instead of android 5).
skeyvin said:
thanks
btw do you have a lineage os rom for the m model or is it possible to compile this to the "m" model?
(as in yt-850m)
Click to expand...
Click to collapse
There are no "official" custom ROMs for this tablet, but it should be possible to compile them.
SomeoneNormal07 said:
There are no "official" custom ROMs for this tablet, but it should be possible to compile them.
Click to expand...
Click to collapse
any way how?
Hi guys,
thank you very very very...very much SomeoneNormal07 !!!!
I'm so happy to see that someone is investing his time on this project for this device (I've the model YT3-X90L, but I hope the ROM will work also for this model).
I cheer for you (unfortunately I am not a developer).
Thanks
Bye
Alex