Incremental updates generator - Android Software Development

INCREMENTAL UPDATE GENRATOR SCRIPT
Incremental updates are the new trend amongst devs nowadays, and many maintainers wonder how to do this.
So I made a handy script to automate that ( make sure that your device has proper incremental commits in trees) , and here's a guide on how to use it:
Just run the script through the command python3 incremental.py
It will ask you for the directory of the old target files and the new one, so give the path which includes the name
Like this : out/target/product/beryllium/obj/PACKAGING/target_files_intermediates/eng-2.zip
Do this for both the old and the new target files of your builds
This will generate a package named incremental.zip, which can be flashed through recovery.
Devices with file based incremental give flashing error with incrementals sometimes if stuff is changed, it happens even if you don't use script. To bypass that, just remove asserts from the incremental zip flashing code. Which is in the META-INF folder.
Here is the link to the script: https://github.com/Dhruvgera/custom_python_scripts/blob/master/incremental.py
Peace out
Hit that thanks button if this helped you
XDA:DevDB Information
Incremental updates generator, Tool/Utility for all devices (see above for details)
Contributors
Dhruvgera
Source Code: https://github.com/Dhruvgera/custom_python_scripts.git
Version Information
Status: Stable
Created 2020-02-16
Last Updated 2020-02-16

jabra fan sir

NOICE

Great work sir ?

Sar tussi great ho

Related

[TOOL] Multiple BLOB retreiver

So, I just built a CM11 for my XT1022 based on @JackpotClavin trees. I found a difficulty in setting up RIL (although Bluetooth was working fine).
I thought maybe, the vendor blobs were a mismatch and they need to be replaced by the stock KK4.4.4 ones.
I found a proprietary-blobs.txt in the vendor directory( again thanks to @JackpotClavin) but the problem was the files list was huge and it would be insane to manually fetch those files
Hence, I wrote a small python script to fetch the vendor blobs from my phone recursively.
The only changes you need to make on the script is to change the paths of proprietary-blobs.txt (path_list variable) and the *croot* path (croot_path variable).
I hope in this way, I am a little helpful to my fellow members in this community
The code:
Code:
#!/usr/bin/python3
#don't forget to put the / at the beginning and the end
path_list="<modify-the-path-to-proprietary-blobs.txt>"
croot_path="<specify croot_path"
try:
f=open(path_list,"r")
except(FileNotFoundError):
print("Invalid file path")
sys.exit(1)
finally:
count=0
a=f.readlines()
for x in a:
count=count+1
b=os.system("adb pull "+a[0].replace("\n","")+" "+croot_path+os.path.split(x)[0].replace("\n",""))
print(b)
print("Job done!")
print("Total files to retreive: "+len(a))
print("No. of retreived files: "+count)
print("Goodbye!")
sys.exit(0)

Shadow53's Custom C-Apps Package Builder

Have you ever wanted to flash the Cyanogen Apps package, only to find that you didn't want all of the apps that were included? Perhaps you like your dialer app, or you don't trust the TrueCaller integration. Maybe you want the Theme Store, but not the new Gallery. Maybe you just want to get rid of CyanogenStats and CMLogger because you're paranoid. Whatever the case, I've got the tool for you!
*Canned Applause*
Behold, I give you this, the program I put together because I wanted to do exactly that: modify the C-Apps package. Just run the program. It downloads the package for you, unpacks it, modifies it, repacks it, and places it in your user's home directory for use.
This program comes with no warranty, implied or otherwise, so on and so forth. I am not responsible for broken things. Use at your own peril.
Beware: This version does not check for inter-app dependencies, so if keeping the new Dialer but the old InCallUI breaks your phone, that's on you. Make sure you know what you are doing as far as that goes. This tool merely helps you.
I have tested this program as best as I can and everything seems to be working correctly. Still, things happen and I can't test for every case. If something bad happens, let me know either here or, more preferably, in the GitHub Issues.
To run this program, make sure you have Java installed and open Command Prompt or a Terminal Emulator and navigate to the directory where the .jar file is located. For those who don't know, this involves using the `cd` command to change directories and `dir` (Windows) or `ls` (Mac/Linux) to list files in the current directory. Then run the file with the command:
Code:
java -jar ModCApps.jar
Other note: I have read through the Cyanogen Terms of Use and do not believe that this project violates them in any way. If I am wrong, let me know and I will take this down. I make no profit from the project, save any thanks people may give me.
Downloads:
Releases on GitHub
XDA:DevDB Information
ModCApps, Tool/Utility for all devices (see above for details)
Contributors
Shadow53
Source Code: https://github.com/Shadow53/ModCApps
Version Information
Status: Beta
Current Beta Version: 0.1.0
Beta Release Date: 2016-05-05
Created 2016-05-06
Last Updated 2016-05-06
Reserved
Reserved

AUTOMATER for ROMs

AUTOMATER​One command automation for most things​
Well, being a ROM developer/maintainer, we spend time in uselessly cloning trees, giving build commands, going through build logs to see where the error is and in the end upload the files and manually get links. And there is no denying that all of this is time consuming. So I made a program to do all of this automagically for you
This program can do:
Trigger the build of your ROM
Send message about the build status
Upload the build and target files to any SFTP client
Send you the direct download links
Send the build log
If the build fails, abort other statements, and send you trimmed build logs
Clean everything and restore the server to the previous state
Can be integrated with Jenkins to provide 1 click builds
Some other miscellanous functionality
Now, moving on to how to use it. This needs you to clone the given source into the scripts folder, which should be located inside the ROM directory. Also, the script assumes that you have clone your ROM sources inside a folder placed in the home directory.
The script is executed by the command :
Code:
devicename="yourdevicebuildname" bash scripts/CI/main.sh
You need to add some stuff in the main.sh file located inside the scripts/CI folder before you can actually use this. They are:
Your telegram CHAT_ID, the place where you will recive all the info
Your BOT API KEY, make a bot through BotFather on Telegram and paste the key
Your SFTP client username, I prefer Sourceforge
Your SFTP client password, once again, I prefer Sourceforge
If you want some other client, you have to alter the rom.py and tgt.py where you can write the client name of your choice.
Also, this script is pre-configured for CygnusOS. So naturally, you will want it for your ROM, to replace the variables, you can just run
Code:
sed -i -e "s/cygnus/your_rom_name/g" $(grep -RI cygnus $(ls)) && sed -i -e "s/Cygnus/Your_rom_name/g" $(grep -RI Cygnus $(ls))
NOTE: CYGNUS GENERATES THE ROM ZIP IN THE ROM DIRECTORY ITSELF INSTEAD OF THE USUAL OUT/TARGET ETC ETC PATH, SO YOU NEED TO CHANGE THE ROM.PY AS FOLLOWS:
Code:
Find the "." and replace it with out/target/product/"+devicename+"/ "
Also, edit the localfilepath to "out/target/product/"+devicename+"/"+name
That's it guys! Now just take a deep breath and leave it all, the script will do everything for you and even remove the generated zip! Yeah, make clean if that's what you wanna hear :laugh:
Hit the thanks button if you find this helpful
Also, if you wanna support me, buy me a cup of coffee
PayPal
XDA:DevDB Information
AUTOMATER for ROMs, Tool/Utility for all devices (see above for details)
Contributors
Dhruvgera
Source Code: [url]https://github.com/Dhruvgera/custom_python_scripts[/URL]
Version Information
Status: Stable
Current Stable Version: v1.0
Stable Release Date: 2020-04-02
Created 2020-04-02
Last Updated 2020-04-02
Congratulations !!!
Great work
Ragy747 said:
Great work
Click to expand...
Click to collapse
:good:
Uwu
PERU
blitzfire3 said:
PERU
Click to expand...
Click to collapse
U Too
great work sir, and thanks.
Peru as heck

[GUIDE] HOW TO BUILD ANDROID FROM SOURCE [2020 Edition]

[NOOB-FRIENDLY] HOW TO BUILD ANDROID FROM SOURCE CODE [2020 EDITION]
Introduction
Hi, my name is Varun, during the times I was building I faced some trouble building, and I thought it would be helpful if I put together a guide that covers every aspect of building. Many roms fundamentally differ so this is a generic guide, but when it comes to modifying device specific files you are going to have to refer to your rom developer or your device tree maintainer.
I see a lot of lead devs referring to older guides on xda, and felt like there should be a good reference thats more recent.
I have heavily depended upon Nathan Chance's Guide which can be found HERE. I feel like this may be a little intimidating for new builders hence this thread. I will slowly upload screenshots here as I find time. But for now this is what I have. You can find my guide HERE. If there are any changes to be made in this thread then it also needs to be changed on gh, so please do comment or make a pr and fix what is requested.
Table of Contents
1) Getting started
2) Prerequisites
3) Understanding the DOC
4) Preparing Linux environment
5) Getting the source
6) Getting device specific files
7) Building
GETTING STARTED
• This guide will help you understand the basics of rom building.
• You must have exprience with linux and terminal
• You must read everything at least once
• If you get stuck at any step, google is your best friend.
If you still struggle, these are places you can get help
1) This thread
2) GitHub
3) Other XDA threads
4) Telegram (Your SOC groups or Android Builders Help)
• Build only if you have time to spare, never rush through the learning stage
• Never think about skipping a step
• If you are planning to modify a ROM, always ask for permission
• If you are planning on including other peoples work in your rom always ask for permission
Prerequisites
• Your system should have at least 8GB RAM and 4 cores (Use Zram for 8gb ram devices)
• Strong internet connection. You will be downloading 50GB+ worth of files
• Ubuntu - this should be installed alongside a primary OS. NOT VM
• Minimum 250GB of free disk space (you can sync 1 ROMs and build for 3 devices at once)
• Git - Read some documentation
• Command Line - get yourself familiar, learn with CodeAcademy
Understanding This Doc
• Notes with background information will be given in italics
•
Code:
is used to represent a command that is run from terminal
PREPARING LINUX ENVIRONMENT FOR BUILDING
• Now the you have finished setting up, a special environment is required for building.
• Preparing the environment is as easy as double clicking .exe in Windows or .dmg in MacOS
thanks to developer Akhil N.
• We need to clone his scripts (installer) from his GitHub
NOTE:
A script is a file which contains multiple commands that run sequentially when executed
Code:
git clone https://github.com/akhilnarang/scripts
• This should copy the scripts to directory /home/username/scripts
• Cd into the directory called setup
Code:
cd scripts/setup
• List out directory
Code:
ls
• Find the file that corresponds to our Linux build. Since we are using Ubuntu it will be android_build_env.sh
For other Distros refer to the readme that has also been cloned
• Run the script
Code:
. android_build_env.sh
• Setup GitHub using on screen instructions
• Congratulations you set up your computer for building
• Go back the previous dir that you were originally on (/home/username)
Code:
cd
NOTE:
cd will always take you to home/username
GETTING THE SOURCE
• This is probably one of the worst steps, you have to wait a while
• GCloud users will be able to download source in 15 minutes
• Other users may have to wait longer (depends on internet connection speed)
• Make a directory for your ROM
Code:
mkdir “ROMNAME”
NOTE:
this will make folder in directory home/username/romname
• Cd in and initiate repository, this basically tells your computer where to download source files from.
The repository initiation command can be found on the GitHub page under “manifest” then scroll down to
repo initialisation and copy command
• It should look like
Code:
repo init -u git://github.com/crdroidandroid/android.git -b 10.0
HINTS
NOTE:
1) Linux users can paste into terminal using Ctrl + Shift + V
2) Linux users can copy from terminal using Ctrl + Shift + C
3) GCloud users can paste into window using Ctrl + V
4) GCloud users can copy from window simply by highlighting
5) GCloud users using ssh from terminal can just follow terminal commands
• Once repo is initialised, you can begin download using
Code:
repo sync -f --force-sync --no-clone-bundle --no-tags -j$(nproc --all)
• Let everything download
GETTING DEVICE SPECIFIC FILES
• As most of you know the kernel acts as the translator between the OS and your actual hardware
• The files mentioned above are android version specific and will only work with that android
version
• The developer for your device aka dt maintainer will have these files on their GitHub and its
usually linked at the end of the op of other rom threads in the source code section
• You have to make sure that the rom version you downloaded matches up
• If the device tree is for an older version then wait until your dev. releases the latest trees, if no
developer is working on your device then it is possible to modify the tree to work with newer
version of android but it may take some effort.
• In case your tree doesnt match with the rom version that you have downloaded, the easiest and best option is
to scrap everything and download the source version that your tree is designed for
• To scrap everything, use
Code:
rm -rf “folder containing rom"
• To modify the init command to download an older version you need to pick out the branch you
need (the branch is basically the version the newer version is added to a new branch)
• Change the init command after -b to include desired branch. For example
repo init -b ten to repo init -b seven
• To get the device specific files, we need to fork them to your GitHub.
Find the stuff (kernel vendor device tree hardware) and fork them
NOTE:
Forking basically copies them to your GitHub
• At this point we need to know if we need to modify the device tree as some ROMs don’t require
you to modify it (CrDroid)(LOS)
• Some roms require only partial modifications, this is rom specific so I wont be going too much into detail
• If modification is required follow these steps , otherwise skip to the end of this section
• After forking we need to modify the files we will do this from the browser for ease of
understanding
•There are three files that need modification and they are located your device tree
• Some tree developers may split your device tree into two parts if there is more than one phone
running the same SOC, so keep an eye out for that. (devices that have the same soc are like the op3/op3t and the op7/op7p)
• The files that we need to modify are under your "device codename" device tree, not "device SOC-common" device tree.
• For example; we need to go to "device_samsung_crownlte" tree not "device_samsung_universal9810-common"
• In here the three files that need modification are
1) Android Products.mk
2) lineage.dependencies
3) lineage_"device codename".mk (example:lineage_crownlte.mk)
• First open AndriodProducts.mk Here replace wherever you see lineage with name of ROM in lowercase only.
• Second, open lineage dependencies.mk and rename file to "romname".dependencies (ecample: aim.dependencies)
• Third, open lineage_"codename".mk and rename to "romname"_"codename".mk and replace
lineage with "romname in the code. (Remember,use lowercase)
NOTE:
If you are building an older version of android make sure you branch out the right branch for your trees
People who do not need to modify can join us here
• Now that all your files are in your GitHub, we need to download them
• There are two easy ways
1) Fast and easy Room Service
2) Slow and boring manual cloning
• Room Service
1) cd into .repo from romsource
Code:
cd .repo
2) Make directory local_manifests
Code:
mkdir local_manifests
3) Make room service file
Code:
nano roomservice.xml
(follow next bullet point on how to make roomservice.xml)
4) Return to ROM folder
Code:
cd && cd "romfolder"
• Making the roomservice.xml is as easy as copy paste.
Visit
https://github.com/vrnsoma/local_manifests/blob/lineage-17.1/roomservice.xml
and copy and paste it into a text editor and edit it then paste it into the terminal window (step 3 in above point)
Hint for Device Tree
Example: link= userabc/repositories/device_samsung/crownlte (location on github)
path= device/samsung/crownlte (Where it should download to)
remote= github (where files are stored)
revision= branchname (which version you want)
• Resync Repo like I mentioned before
Code:
repo sync -f --force-sync --no-clone-bundle --no-tags -j$(nproc --all)
BUILDING
• Run
Code:
. build/envsetup.sh
• Then
Code:
brunch codename
• Make sure to clean build by running this in between builds
Code:
make clobber && make clean
• If you are using a slow system and want to improve build speeds, use the following command
for making partially clean builds for incremental updates
Code:
make installclean
• Building without cleaning is called dirty building and is never advised and do not do this unless
you know what you are doing
KEEPING SETUP UP TO DATE
• Repo sync will keep your rom and device specific files that have been deined in roomservice up to date
CREDITS
NathanChance
All threads on XDA
All guides on Github
All devs found on Telegram
If you want specific credits plz do notify me!
XDA:DevDB Information
BUILDING ANDROID, ROM for all devices (see above for details)
Contributors
vsoma
ROM OS Version: Android 10
ROM Firmware Required: NOOB
Version Information
Status: Stable
Created 2020-10-03
Last Updated 2020-10-03
I need rom porting guide for android 10....can you make thread on it?
I tried the tutorial, after the step repo sync -f --force-sync --no-clone-bundle --no-tags -j$(nproc --all). I get message error: RPC failed; curl 56 GnuTLS recv error (-24): Decryption has failed.
i can't finish compiling because java.lang.outofmemoryerror : heap size but i have already set the heap size to 8gb

[PROJECT] Android Oreo Go for the Lenovo Yoga Tab 3 (YT3-850F)

---
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

Categories

Resources