Extract vendor files - Android Q&A, Help & Troubleshooting

Hi all. I have a question regarding to the propietary files (vendor blobs source) of my device, which is a Huawei Mediapad T1 10 T1-A21w (codename "hwt1a21") with a msm8916 chipset and Android 4.4.2 (EMUI 3.0).
This device has absolutely zero development, so i had to create a (functional?) device tree, and fortunately i have the kernel source from the Huawei website but the only problem i'm facing now is related to the vendor blobs files, which i cannot get them.
I tried to follow many guides about this but i didn't find any of them that explain how to extract the propietary files from a device connected to adb and extract them with a script (extract-files.sh i think it was called) instead of download them from existing blobs files in a github repo.
I've being following the CM guide (this one) in order to create and extract the device tree and vendor files but i struggled in the vendor files process, in which supposedly i should have the extract-files.sh script and the most important, the propietary-files.txt which indicates which specific vendor files must be extracted by the extract-files.sh script. So that's the problem, i have no idea how i supposedly should get that txt file with the specific vendor files to be extracted from my device.
Hope someone can help with this, i've been months trying to bring development for this device.

Hello buddy i have the exact same situation as yours. Did you find a way out? My device has zero development. Made tree and kernel source. Could you please help?

Up ? need help too

Vendor files are located either in /system/vendor or /vendor. If location is /system/vendor then device must be rooted and /system/vendor must be mounted as read-write to access it's content via ADB.

Related

[Q][REQ]Porting roms among different devices

Hey there XDAians....
Can someone here point me to a walkthrough or tutorial on porting roms from and to devices of different manufacturers,resolution(mdpi,hdpi etc.) etc.I am familiar with the zip method of porting roms from same manufacturer(sony in my case,xperia U to Sola)but i want to know about porting roms from others like htc,samsung etc and Tools/apps needed to accomplish this.Most of the tutorials i found on XDA are based on the same method of zip porting.
Please help me with this,i really want to learn more about porting.
In the minimum, you must learn how to create a boot.img for your new device based on the boot.img (especially the ramdisk) from the old device.
To do this, you must extract the boot.img of your old device, edit the ramdisk (As there are lots of files named like the device, and those must be renamed to match the new device's name) Probably you must also change the content, to match the needs or to update references to some files, where the name changed.
After this, you can recreate the ramdisk.
Than extract a boot.img of your new device to get the kernel. Take the new Kernel and the new Ramdisk and make a new boot.img
Extracting and recreating a boot.img is described in the later part of this article: How to build a custom kernel
Recreating a ramdisk is described in this article: Create/Modify ramdisk
This might be the first step of a lot of steps...
Kind regards Uwe

[Help]Problems getting Proprietary Files/Binary/Blobs

Hello, my device is a Samsung Galaxy Music and I've been trying to make a device tree and needed to get the proprietary files. Using ADB in windows, I wanted to execute the extract-files.sh in my stock rom and if I'm correct it should be inside /vendor/samsung/ivoryss in my case, however, the vendor folder exists but inside there are only two files: a folder called pittpatt and a file named gfx.fw . Also used a command to search files and searched for extract-files.sh however it wasn't there. Do I'm doing something wrong? Should I do it from a linux OS like Ubuntu? Also I downloaded the source from the Samsung Open Source Release Center. Are there the proprietary files?
My phone is rooted and it has USB debugging activated.
Edit: Also I tried extracting boot.img and its files however it has exactly the same files of recovery.img so I'm completely lost...
Edit2: Oh I'm sorry, I should had post this on Android Q&A, Help & Troubleshooting, is there a way to move it without reposting it?

[GUIDE]How to Port Lollipop and Marshmallow Based ROMs

Some Basic things u need to Know before Porting
The rom which you want to port for your device is named here as PORT
The rom which is already working for your device is called here as BASE
First unpack system.new.dat in both port and base rom
For Ubuntu
Now we need to decompress .dat to ext4 img
Open terminal and
Now enter this command
./sdat2img.py system.transfer.list system.new.dat system.img
By running this command u can see a system.img
decompress ext4 img to output folder
Now we will mount system.img
Enter this command
sudo mount -t ext4 -o loop system.img output/
Now go to output folder and now u can see all folder and apk like a KitKat rom
Now do the same with port rom
Click to expand...
Click to collapse
For windows use System Extractor for unpacking
1. Delete app,font,framework,media and priv-apps in base rom
2. Copy app,font, framework,media and priv-apps from port to base
3. Copy handheld_core_hardware.xml and platform.xml in system/etc/permissions from port to base
4. Copy 00banner in system/etc/init.d from port to base
5. Now open build.prop in both base and port for editing rom version and other things.It is different in different roms. For CM edit
ro.cm.version=
ro.cm.releasetype=
ro.modversion=
ro.cmlegal.url=
ro.cm.display.version=
ro.config.notification_sound=
ro.config.alarm_alert=
ro.config.ringtone=
Note: You have copy the above lines from port to base. Don't forget to add your device name in place of port rom's device name
6. Copy these files in system/lib from port to base I repeat from port to base
libandroid_runtime.so
libandroid_servers.so
libmedia_jni.so
For AOSP based ROMs other library files are also needed for boot up. For example Dirty Unicorn needs
libgui.so
libsurfaceflinger.so
libsurfaceflinger_ddmconnection.so
libwifi-service.so
If you are porting a 64 bit ROM copy these files in system/lib64 too from port to base
7. Unpack boot.img of both base and port rom and open init.environ.rc in ramdisk. Copy and replace all the lines starting from "bootclasspath" from port rom's environ.rc to base rom's environ.rc and repack boot.img . Use Android Image Kitchen for unpacking and repacking boot.img
8.Now we need to compress the base rom
For Ubuntu
Now enter this command
./make_ext4fs -T 0 -S file_contexts -l 1073741824 -a system system_new.img output/
Now u can see ur system_new.img
now we need to compress it back to .dat
Now enter command
./rimg2sdat my_new_system.img
Now u can see system.new.dat
Click to expand...
Click to collapse
For Windows, System Extractor has an option to repack but it causes bootloop for me. Ignore step 8 if it causes bootloop
NOTE: You'll need a different updater script for unpacked system
9. Zip it back and Flash
Downloads
sdat2img.py
make_ext4fs
rimg2sdat
Now Download all these tools and paste it to ur base and port rom directory then follow instructions to port lollipop roms
Click to expand...
Click to collapse
CREDITS
VigneshS007
xpirt
matrixex
How to fix bootloop
Some Roms may not boot even after doing everything correctly. This method should be only used when nothing works
1. Copy all the files in system/lib, and system/lib64 if it's a 64 bit ROM, from port to base except the these files and folders
drm
hw
modules
soundfx
libGLES_trace.so
libGLESv1_CM.so
libGLESv2.so
libGLESv3.so
I repeat you have to leave the above files and folders and copy all the other files in system/lib from port to base.
If it still doesn't boot follow the second method
2. Unpack boot.img of both base and port, enter ramdisk and copy these files from port rom's ramdisk to base rom's ramdisk
seapp_contexts
sepolicy
service_contexts
Repack boot.img and flash it
IMPORTANT: This method should only be used when nothing works and if it boots after copying all the lib files, you will have to figure out which lib files are causing bootloop because port rom libraries will create many bugs.
Reserved
From who smartphones we can ported roms ?
Sparco21 said:
From who smartphones we can ported roms ?
Click to expand...
Click to collapse
https://en.wikipedia.org/wiki/List_of_Qualcomm_Snapdragon_devices
6.2 Snapdragon 410 and 412
Missing in this list:
Ark Benefit
Elephone Trunk
thanks for releasing the guide
Thanks for the tutorial!
Tried porting slim6 from redmi 2 but got stuck on bootanimation forever.What Im I supposed to do with the build.prop?
I already tried
-not touching it
-replacing it
-replacing some things
all ended in just bootanimation :/ I use the nexus 6.0 rom for base
BTW should I replace kernel(zimage) in boot.img(havent done it)?
Whenv i try to repack the system folder to system.new.dat with the Extractor for Windows i always get the following error: "It seems like the extractor not worked with your provided system folder please contact me for help".
I have read that specially the CM roms give this error but i cannoy understand how to fix it even after search the solution.
The rom i was trying to port is a CM12.1 rom. Anyone knows how to solve this?
mustang_ssc said:
Whenv i try to repack the system folder to system.new.dat with the Extractor for Windows i always get the following error: "It seems like the extractor not worked with your provided system folder please contact me for help".
I have read that specially the CM roms give this error but i cannoy understand how to fix it even after search the solution.
The rom i was trying to port is a CM12.1 rom. Anyone knows how to solve this?
Click to expand...
Click to collapse
Do you have python installed ?
mshoaib7 said:
Do you have python installed ?
Click to expand...
Click to collapse
Should i had to install Python in Windows? I didn't know Python exists in windows.
mustang_ssc said:
Should i had to install Python in Windows? I didn't know Python exists in windows.
Click to expand...
Click to collapse
Yes it does exist for windows. And if it still doesn't work ask this in system extractor thread
mshoaib7 said:
Yes it does exist for windows. And if it still doesn't work ask this in system extractor thread
Click to expand...
Click to collapse
I have just tried it but still the same issue.
I saw that the dev of the system extractor tried to explain how to solve the issue but honestly i don't undestand nothing of the process he's talking about, i was completely confused. For example, for some reason he was talking about the updater-script but i don't understand what relation are between what i want to do (repack the system folder) and the updater-script (located in the meta-inf folder).
Not booting, porting same vendor ROM but different model similar specs
Followed your tutorial till the last solution but no luck. I am trying to port my own device ROM but of a different model. I have Qiku Q Terra 808, model CP8692_I02 with 360 OS v21 and was trying to port v109 360 OS of model CP8692. The specs and everything is same however I am still unable to boot. There was a very weird thing happened when I flashed the ported ROM and restored the backed up data before booting. The device booted but it reboots on it's own in less than a min of booting and the cycle goes on. And if don't restore the data it goes in bootloop right away. I get the display on, optimizing apps then reboots and cycle goes on. The 360 OS are known for security and the device has fingerprint scanner. Do you think the stored fingerprint is causing issue in flashing new ROM or incorrect update script is the culprit?? Please advise.
@mshoaib7 Awesome tutorial man...??
CM14 theme engine has not been integrated at present, many functions is still in the invalid state, would you be interested in transplantation AOSP 7.1?
Very good ?A great help ?Moto g 2015
mshoaib7 said:
How to fix bootloop
Some Roms may not boot even after doing everything correctly. This method should be only used when nothing works
1. Copy all the files in system/lib, and system/lib64 if it's a 64 bit ROM, from port to base except the these files and folders
drm
hw
modules
soundfx
libGLES_trace.so
libGLESv1_CM.so
libGLESv2.so
libGLESv3.so
I repeat you have to leave the above files and folders and copy all the other files in system/lib from port to base.
If it still doesn't boot follow the second method
2. Unpack boot.img of both base and port, enter ramdisk and copy these files from port rom's ramdisk to base rom's ramdisk
seapp_contexts
sepolicy
service_contexts
Repack boot.img and flash it
IMPORTANT: This method should only be used when nothing works and if it boots after copying all the lib files, you will have to figure out which lib files are causing bootloop because port rom libraries will create many bugs.
Click to expand...
Click to collapse
shoaib bhai is this guide also for nougat roms?
MR.HACKER5476 said:
shoaib bhai is this guide also for nougat roms?
Click to expand...
Click to collapse
No, only some of the nougat Roms boot with this guide
Some one can port VIVO Y21L ROM & kernel for Lenovo A6000....
VIVO Y21L has same SD410 chipset as Lenovo A6000. @With support of VoLTE and OTG....
It not complete Guide
If you port tw roms,You will not get bootup.
Tried to port J5 rom or grand prime rom?

Creating AOSP ota package with make dist, but it's missing boot.img

Hello everyone,
I am currently developing with AOSP 5.1 for a FriendlyARM s5p4418 (NanoPi2).
Our special firmware is working nice, building it creates all the necessary img files (boot.img, system.img, userdata.img, ...).
But when I do a "make dist", it is not copying the boot.img into the IMAGES/ folder in out/dist/ folder. So when I try to continue, I cannot create a ota-package because the releasetools/ota_from_target_files crashes when trying to calculate the Difference of recovery-Image and boot-Image. Both are of type NONE because they are not existing.
Why is it creating the boot.img when using just make, but not creating or using it with make disk.
Is it because I am using the prebuilt kernel zImage?
Is there a way to fix this? Or to create an OTA package from the files that make creates?
Greetings
Tobi
Well it seems I found the problem.
The device tree is setting TARGET_NO_KERNEL to true, because it is using a prebuilt kernel uImage.
I did now set this to false and copied the uImage to $(PRODUCT_OUT)/kernel and now it is compiliing a recovery and the boot also.
But I do not know if this is the correct way to do it?

extract device sources files from stock rom

Is it possible to extract device sources files from stock rom like vendor blobs with extract-files.sh ?
I have system / boot and all other images available on my linux system.

Categories

Resources