[MOD]SplashInjector[OP3/T] - OnePlus 3 Themes, Apps, and Mods

SplashInjector​splash injector is a tool created by me based on the work done by @makers_mark . it is a basic command line interface but it gets the job done. it supports all oneplus devices so far except the oneplus x :crying: i can add support once someone gets me the logo.bin file from that device. The tool is pretty simple its based on the work here https://forum.xda-developers.com/oneplus-3/themes/mod-splash-screen-image-injector-t3441999 this is where i got this all from. i know it can be kinda hacky and only supports unix systems i think you can get it working by using git bash on windows. In its current state it can decode and encode all oneplus logo.bins (Including the OnePlus 5!) it can also pack flashable zips for you automatically. all you need to do is run the decode option edit the file you want in the output folder. Then you can run the encode command and it will pack it all back up. Then package it with the package command. Once again major credit to @makers_mark he did all the leg work. i just made it a little more friendly. lmk if there is any issues you find
Telegram: @ethanbanker if you need anything contact me here.
Now lets get to it
follow the instructions here located here
https://github.com/ethanbanker2428/SplashInjector
Updates:
1.52: Ok guys im not a windows expert...i barely use it so the tool does support windows now but it cant package files. it does give you all the tools and files you need to package one tho. you can use a tool such as this https://forum.xda-developers.com/android/software-hacking/tool-6-feb-android-flashable-zip-t3551772 this update also includes a completely revamped system. lmk about any bugs you find. for windows you need to install and use GIT bash. i also added a update function to easily update the tool. its simple but it works. heres my git again for you guys https://github.com/ethanbanker2428/SplashInjector
WARNING I AM NOT RESPONSIBLE FOR ANYTHING YOU DO. DO THIS AT YOUR OWN RISK

Works great dude thanks

Related

[SCRIPT] BarebonesAndroid

Hello everyone! My name is geeksunny and I am fairly new to the community. Been a lurker for a quite a while now but I finally have something to share!
BarebonesAndroid
What it is
What I have here is a Bash script to automate backing up your /system/app directory and then steps through a list of packages offering to remove them from your device. It runs on your Linux PC and uses ADB to interface with your device.
I wrote this for myself to automate the process of trimming my system down after I flash a new ROM. I recently bought a Nook Color and have been flashing CyanogenMod 7 nightlys to it pretty frequently. I also use a Motorola Droid phone and this comes in handy for the same reason on that device as well.
Seeing as how this was written with CyanogenMod 7 in mind, I am not sure how well it will work with other ROMs. I think it would work as it uses generic uninstall commands. It is based off of the packages that come in CM7 so those packages are the only ones considered by this script.
Note: I'm pretty rusty with my Bash scripting and kinda threw this together in my spare time. It may not be the prettiest script in the world but it gets the job done!
Requirements
To use this script you must...
- Be running a Linux/Unix based OS. (I use Ubuntu for my SDK machine. I don't have a Mac and do not know for sure if this will run on OSX.)
- Have ADB set up correctly and talking with your device.
- Have read/write access to your device's /system folder. (Be rooted.)
How to use it
Unzip and run ./BarebonesAndroid.sh in your terminal.
if ./BarebonesAndroid.sh is not executable, run this command:
Code:
chmod 775 BarebonesAndroid.sh
- It will first ask you to confirm that the device is connected and recognized by ADB.
- It will then ask if you want to back up your /system/app directory before removing any packages. If yes, you can specify a directory for the script to back them up to. It will default to ./apkBackup
- After this it will begin ask you one-by-one if you want to remove a given package. Enter Y or N for each package.
- When the script is finish it will reboot your device.
Future plans
I originally wrote this for myself but thought this could be useful to others out there. Right now the requirements aren't all that accessable to the average user (Linux OS with ADB set up). If there is a demand for it, I may write a Windows batch script version, or maybe convert it into a cross-platform command-line application. Let me know what you think of this idea!
I do have a book on Android development and my eventual goal is to turn this in to a native app!
Regarding the script...
- Add support for multiple devices. Right now it asks that you only have one device connected at a time. This is because I haven't had experience with multiple devices hooked up at once. I plan to fix that in the future.
- Add more error checking and failproofing.
- Streamline the experience. Make things a little more graceful than going through a set list one-by-one.
- Sort the apps. Perhaps add categories.
- Check installed packages and only offer to remove them if they are installed.
Thats it! Thanks for looking!
Thanks dude, good work!

How to Port a ROM to Milestone2

As lately some people are asking me about ROM porting I decided to create this new thread where we can share knowledge about this hard task.
Please note this is a Dev talk thread, so DON'T ASK about fixing a particular ROM problem here. Also don't ask questions like "My phone is bricked! please help!". This IS NOT the appropriate place for it. There are plenty of other threads to help you out.
Also note that this is not a step by step guide (and not a guide at all), it's just a point where you can start from. Android is a very complex system and there are many things I don't know yet. So, research and hard work is what you need to learn it deeply. My first tip is Google really works. Don't be afraid to search
Ok, to the basics. Porting a ROM is no simple task. It requires advanced understanding of how android works and how it is organized. Previous Linux/Unix knowledge helps A LOT. As android is based on this O.S. there are many similarities between both. In fact many ppl consider android to be a kind of linux distro.
The very first task to port a ROM is finding a device which is compatible with your own. For example Defy/Milestone2. Then you are going to choose a ROM to port to your device.
As our devices (Milestone2) have a locked bootloader we now need to find a system image that have a compatible kernel with the ROM we are trying to port. This is mainly based on trial and test and takes a long time. You'll be ending flashing your phone several times with RSD Lite. You should learn how to use MotoAndroidDepacker and how to create a fixed SBF.
The basic procedure to try that:
1. Open original ROM update.zip and remove any files/commands that flashes boot/devtree/recovery/anything.
2. Install this new file on your phone via CW Recovery.
3. Boot into bootmenu and enable ADB so you can read logcat while phone boots.
4. Choose Boot/Normal. If your ROM uses 2nd-init you will need to place/edit/adapt bootscripts into bootmenu 2nd-init folder.
5. Check logcat for errors:
- If you're getting HAL errors you're going to need a new kernel;
- If you can start android without getting HAL errors but still getting errors and bootloop on android animation you should try to replace libs with appropriate original ones.
6. Once you are able to boot android you should test it's features to see what needs to be fixed.
This is what I have to say for now. The thread is now open for discussion.
At this week, motorola has just pushed the GB official update for Droid 2 and Droid 2 Global....
Can i try to port this new rom to milestone 2 and after a success boot, fix the radio..??
I was asking that, because some people has success on port CM7 to milestone 1, when it originally maked for droid 1...
tks a lot..!!
jorgebaruchi said:
At this week, motorola has just pushed the GB official update for Droid 2 and Droid 2 Global....
Can i try to port this new rom to milestone 2 and after a success boot, fix the radio..??
I was asking that, because some people has success on port CM7 to milestone 1, when it originally maked for droid 1...
tks a lot..!!
Click to expand...
Click to collapse
It may be possible, but you'll have a hard time fixing the baseband.
You may have to mod the init.rc scripts and find the right radio binaries (rild is one of them) and drivers.
Ask those ms1 people for help, if they are still with the same phone...
Sent from my Milestone 2 XDA App
I don't know if this will be relevant or not.
I wanted to know if to do any of this, having a Linux distro as OS a must or can I try my hands at it on a windows based machine. I mean I'm sure that a Linux distro will give certain advantages (as Android is based on UNIX/Linux) but can we get things to work a 100% on windows.
If yes, then will someone be kind enough to get give the list of all softwares etc. which will be required to do the job on Windows machine as well as a Linux machine.
I do know a few softwares but I'm not sure if I have an exhaustive list. I would like to learn and try and at least be able to modify in bits n pieces to begin with.
I apologize if this wasn't supposed to be asked in this thread.
The only thing i can get from SBF is a bunch of smg files.
But the only ones i can open are
preinstall.smg
CG39.smg
Is there a way to open/see the rest?
2)
Im trying to modify the CM7 rom, what boot does it use? 2nd-init or 2nd-boot?
i guess it is second-init. but not sure
thanks a lot for this !!!
WeeDv2 said:
The only thing i can get from SBF is a bunch of smg files.
But the only ones i can open are
preinstall.smg
CG39.smg
Is there a way to open/see the rest?
2)
Im trying to modify the CM7 rom, what boot does it use? 2nd-init or 2nd-boot?
Click to expand...
Click to collapse
SMG files are disk images of certain partitions of your flash memory.
You can only open CG39.smg and preinstall (CG66.smg) because they are the only images in ext3 format. The rest of images may be on ramdisk format or some proprietary format. For more details on partition codes take a look here:
http://and-developers.com/partitions:cdt
You may be able to open and see contents of other partitions but the only one that matters aside from system and preinstall is the boot partition (CG35.smg), which contains the init scripts we should mod in order to make they work with 2nd-init. Boot partition is in ramdrive format. More details here:
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
http://elinux.org/Android_on_OMAP
It is easier to unpack boot image using Dsixda's Kitchen here:
http://forum.xda-developers.com/showthread.php?t=633246
Edit: To see what boot your CM7 uses just go inside /system/bootmenu/config and look for a file called default_bootmode.conf. That should be the boot method used. It's normally 2nd-init.
sahilarora911 said:
I don't know if this will be relevant or not.
I wanted to know if to do any of this, having a Linux distro as OS a must or can I try my hands at it on a windows based machine. I mean I'm sure that a Linux distro will give certain advantages (as Android is based on UNIX/Linux) but can we get things to work a 100% on windows.
If yes, then will someone be kind enough to get give the list of all softwares etc. which will be required to do the job on Windows machine as well as a Linux machine.
I do know a few softwares but I'm not sure if I have an exhaustive list. I would like to learn and try and at least be able to modify in bits n pieces to begin with.
I apologize if this wasn't supposed to be asked in this thread.
Click to expand...
Click to collapse
Don't worry, this is the right place
As for your question: yes you can work in windows if you like, but using at least a Linux VM is more productive. I don't have a full list of applications to give you, as different mods may require different tools, but I advice you to have at least:
- Notepad++ (essential for editing text files and keeping linux end-line format);
- dsixda's Android Kitchen (http://forum.xda-developers.com/showthread.php?t=633246)
- 7zip (or some other compress tool you like)
- Moded putty for ADB as working with windows command prompt really suck (http://forum.xda-developers.com/showthread.php?t=803225)
- Oracle Virtual Box (if you are going to use linux VM).
r2beta0 said:
SMG files are disk images of certain partitions of your flash memory.
You can only open CG39.smg and preinstall (CG66.smg) because they are the only images in ext3 format. The rest of images may be on ramdisk format or some proprietary format. For more details on partition codes take a look here:
http://and-developers.com/partitions:cdt
You may be able to open and see contents of other partitions but the only one that matters aside from system and preinstall is the boot partition (CG35.smg), which contains the init scripts we should mod in order to make they work with 2nd-init. Boot partition is in ramdrive format. More details here:
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
http://elinux.org/Android_on_OMAP
It is easier to unpack boot image using Dsixda's Kitchen here:
http://forum.xda-developers.com/showthread.php?t=633246
Edit: To see what boot your CM7 uses just go inside /system/bootmenu/config and look for a file called default_bootmode.conf. That should be the boot method used. It's normally 2nd-init.
Click to expand...
Click to collapse
Thanks again r2beta
thanks r2beta0
- Notepad++ -- got it
- dsixda's Android Kitchen -- downloaded (need some link for a how-to on its usage)
- 7zip -- got it
- Moded putty for ADB -- got it
- Oracle Virtual Box -- can't install Linux on my system as this is a work machine
dunno if I can do without the last option.
sahilarora911 said:
thanks r2beta0
- Notepad++ -- got it
- dsixda's Android Kitchen -- downloaded (need some link for a how-to on its usage)
- 7zip -- got it
- Moded putty for ADB -- got it
- Oracle Virtual Box -- can't install Linux on my system as this is a work machine
dunno if I can do without the last option.
Click to expand...
Click to collapse
Oracle Virtual Box is an application that lets you run an operational system on a virtual machine, in other words, it doesn't install linux on your real computer. It's a very useful tool that I use everyday. Google for it and learn a bit, you won't be disappointed. About kitchen: the link I provided was download + guide. Read it again. If necessary read the full thread.
r2beta0 said:
Oracle Virtual Box is an application that lets you run an operational system on a virtual machine, in other words, it doesn't install linux on your real computer. It's a very useful tool that I use everyday. Google for it and learn a bit, you won't be disappointed. About kitchen: the link I provided was download + guide. Read it again. If necessary read the full thread.
Click to expand...
Click to collapse
I know a bit about virtual box but as I said I'm not allowed to have softwares not approved by the IT team to be present on the system. Though I can get away with small things like notepad++ and 7-zip, having virtual box on my system may raise some eye brows.
I'm trying to arrange an alternative system.
Me neither. I must do almost everything at home, and at this very moment I simply don't have any free time. I'm afraid you're not going to see me here very often anymore (maybe in a few months? a year? well, it might be a bit too late for milestone2...)
hi. Have a question, I want to remove baseband from a flashable zip (lets say, CM7 from Tezet) , is it posible? I dont know where to look for it (baseband). Thanks!!
Baseband is located in \system\etc\motorola\bp_nvm_default\
But don't remove it, just replace it with files from ROM, which have baseband you want.
---UFO--- said:
Baseband is located in \system\etc\motorola\bp_nvm_default\
But don't remove it, just replace it with files from ROM, which have baseband you want.
Click to expand...
Click to collapse
Ok thanks for the info.
Sent from my A953 using XDA
Hi All,
Just a quick question. I have ported Paranoid Android 2.10 to MS2 but the problem I am facing is that Reboot goes through Bootmenu and I have to choose reboot from Bootmenu again.
Any inputs?
Thanks in advance
Megalith27 said:
Hi All,
Just a quick question. I have ported Paranoid Android 2.10 to MS2 but the problem I am facing is that Reboot goes through Bootmenu and I have to choose reboot from Bootmenu again.
Any inputs?
Thanks in advance
Click to expand...
Click to collapse
I meant to get to it last night, but I was tired after work and fell asleep watch tv. Eventually, later tonight, I'll be uploading PA for MS2. Check my Defy PA thread in 12-14 hours cause I'm about to go to work and I'm not gonna feel like making a MS2 PA thread or updating my Bravo PA thread -- but the Defy Thread is always up to date when I put out new roms.
Also, I'm looking to get either a Defy or MS2 -- I've heard that there's 3G issues with AT&T users (which I am) with the MS2 -- Apparently the MS2 has different 3G frequencies than AT&T. Are there any AT&T MS2 users who are knowledgeable about that? While I can deal with no 3G, edge only, calls only -- I need to make sure I can at least do that before I commit to something.
I'd rather have the MS2 because I want a hw keyboard and I don't have the $300+ to try and get a Photon Q LTE from eBay (and I don't have to change up my repos if I get a MS2). If anyone here knows of a phone that's AT&T compatible, Defy code compatible, and has a keyboard, please let me know.
Thanks.
//Normally I'd post the latter half in the Q&A section, but ya'll don't have one so I'm just gonna piggyback
//My Bravo doesn't have a Q&A page either -- it needs one that's not my PM box...Don't PM me on how to root your phone and flash CM7 -- read one of the 5 guides on the first page of both General & Dev...:silly:
Ok devs need some help here.
I am trying to port a rom to our Milestone 2...but it bootloops on rom animation.
I tried to logcat it but I don't think it gets as far as adb server to detect the device.and just keeps saying "waiting for device"...so I end up with no logcat to diagnose the problem.
I can logcat my current working rom but only after the phone boots....am i missing something here? please, help
Any help is very much appretiated.
Thanks a lot in advance

[REVISION] [TOOL/LIB] Flashy v2.0.2 Alpha GUI Flasher/remote control using .net/mono

This is my revision of the Flashy tool, look below for the original thread and an explanation what it's meant for.
Don't know if it's worth the effort, but made a repo at github aswell, here is the link, any feedback is much appreciated.
For commiters, pls keep the master branch clean to "stable" builds, for commiting while development the workinprogress branch is ment for.
Changelog is below.
Will split it up to source changes and tool changes soon.
theq86 said:
Hello devs,
I made a tool to quickly flash image files to the device. it uses fastboot and adb as backends, but offers a UI to do the work. This is not only a handy GUI tool, but a full object oriented library for the .NET Framework, which the tool builds upon. You can use the wrapper library to access the most important adb and fastboot commands from within any .NET program, thus building new real applications instead of batch files. it is up to you if you want a console application, a gui or even a windows or webservice, as long as you program in a .NET environment.
Flashy is just an example what is possible to do. You can use it to flash any file to your device without having to employ the console or write fastboot commands.
Recent changes:
* added splashscreen flashing capabilities to the library and the flashtool
If you found bugs or have improvement ideas, feel free to write in this thread.
Attachments:
1) the handy Flashy-Tool
2) The .NET Wrapper's source code. Public domain, feel free to download, change, compile, sell for a million bucks or print out for your grandma
3) The Flash Tool's source code, also PD
Click to expand...
Click to collapse
Original Thread
Changelog:
v2.0.2_ alpha
Workers administrate themselvs now
Library documented (can be extended)
Gui partialy documented
fixed fastboot output
splited timouts for fastboot and adb (finetuning needed)
added readline method to base of adb and fastboot
changed return type of execute methods, stream isn't returned anymore, readline replaces it
some minor changes
v2.0.1_ alpha
Windows & Mono support (Unix/Linux/MacOs)
Redesigned most parts of the library and gui (still something left)
Cleaned up sourcecode
Added adb shell support with custom commands (atm no preset, you have to type them yourself)
Added logcat support with custom filters (atm no preset, you have to type them yourself)
Custom path to adb (atm not split up in two paths for adb and fastboot) can be set
Check if adb and fastboot are present inside the directory, otherwise fastboot is disabled
Possibility to disable fastboot at the gui
Deleted most of the Messageboxes, using textbox at the mainwindow instead
Synchrone and Asynchrone (atm buggy, maybe using another approach for it) processing at the library, Gui asynchrone (library is still used synchrone for stability, but uses the output stream directly [works fluid with logcat])
Choosen adb-path is stored for following starts
and everything else i missed, sry it's late and i'm tired^^
reserved for future
did somebody already flash any spashscreen to DS?
docertabum said:
did somebody already flash any spashscreen to DS?
Click to expand...
Click to collapse
Yes did it now, but had a little bug, the gui tried to execute the command with adb instead of fastboot, my fault, shouldn't change (or copy and paste) code as late as i did yesterday, sry.
Added the fixed version.
Unfortunately there is no output of the progress shown atm (even if the same stream is used as with adb) but it works, have tried it myself (you need an nb file like usual when you try to flash a splash with fastboot, will also look if i can change this [convert it internal]), will take a look at it later, now it's first time to go home^^
Tectas said:
Got a little finding for you, the gui itself isn't that big impact, but i really like the library to setup your own Applications, even if it wouldn't be that much effort to build one yourself, it's nice to have.
In the op isn't mono mentioned, but it should work as well, will test it later.
Hope you enjoy it.
Original Thread
Added changelog, binarys and source of my revised version, hope you enjoy it
Click to expand...
Click to collapse
eheh... Always wanted to learn C# or derivatives. Maybe this is the incentive I needed. Terrific work, thanks mate!
Cheers
lowveld said:
eheh... Always wanted to learn C# or derivatives. Maybe this is the incentive I needed. Terrific work, thanks mate!
Cheers
Click to expand...
Click to collapse
If you want to, I can create a git repo for it
If it's pushed further like I want to, it will grow up to an allround tool.
Ah, but missed to document the source yet, will catch up later
Swifted from my Desire S far away from my PC
New version is up, enjoy it
Swifted from my Desire S far away from my PC
Added github repo, latest binary zip is also uploaded to it (but no changes since yesterday yet).
Just to keep you updated:
Been working on full async support for the library, it's not finished yet, (but not much is left).
Implemented it with almost the same pattern as in the GUI and just as a side node, in future it will always run async, if you use sync mode, it just fakes it by not starting more then one async process at the same time.
If someone wants to take a look at the current source, the workinprogress branch on github is at the current state.
Next I will take a look at is, more fastboot commands and goldcard creation (thx to the voters).
Fastboot is easy to implement and will come soon, the goldcard will take some time, because I need to figure out how I can generate the image.
Additional to this I will give the mainwindow a small beauty cure (I don't like the radio buttons^^) and will implement the interactive shell (to be honest, I already integrated the possibility in the lib, but haven't tested it yet [yes that's what I voted for ]).
And the last thing on my schedule is (except of bugfixes, if needed) the ability to store from the user flashed images or nb files, that he can choose them from a list if he needs one of them once more (i.e. Boot.img after a romupdate)(first step to recovery feature ).
Other things will also come for sure, but that's enough by now I think^^
If someone else wants something else, or got something that may should be on the list too, pls tell me.
Swifted from my Desire S far away from my PC

[WORKAROUND][LINUX WIRED TETHER] Patch for Linux USB tethering with Gingerbread

I finally found a fix for wired tethering in Linux
A few of you may know that, for some reason, USB tethering with Linux stopped working after the update to Gingerbread. It still works with Windows, but Linux shows a 'bad crc' error in dmesg when USB tethering is activated. But someone figured out a fix, which I finally found and tested. I can confirm that it works with CM7 beta 2 using the built-in tethering option (and I am using it to write this post). The website where I found the patch did not mention what rom it was tested with, but since the patch is for a Linux module on the computer, it most likely won't matter.
Here is the website where I found the instructions - note that you will need to download the patch file, and make sure you have the Linux kernel source (that should be standard, but if you get an error about missing files...). Finally, be sure to pay attention to the punctuation used - code portions containing `uname -r` and M=`pwd` are NOT using the single quote - they are using the symbol located with the ~ (tilde) symbol, and this is extremely important. Anything contained in those symbols will be replaced with their output before execution of the command that contains them - similar to the use of parentheses in algebra.
The command uname -r returns the current kernel revision number, which is used to dynamically direct the commands to the most current source code.
`pwd` resolves to the Present Working Directory
If you prefer a more automated method, I have created a script that follows the commands from the above website, and packaged it with the patch file. Just extract both files into $HOME/Downloads (your Download directory in your home path), and run ./linux-rndis-patcher.sh - you may need to sudo chmod 0755 linux-rndis-patcher.sh first
I hope others find this as useful as I have. I take no credit - my contribution, the script, is a basic copy-and-paste job (tested and confirmed to work on the originating computer).
Update: the process works for the newer 3.2.0 kernel included in Linux 12.04, with slight modifications to match an updated directory structure in the source package. I updated my linux installation only to find that the old problem had returned. I am attaching a copy of the updated script - you can run it (make sure the patch file is in the correct directory) or simply use it as a command list.
Also, I should point out that this does not patch your kernel - it builds a patched stand alone module that can be used to override the built in version. This means it is easy enough to revert the process - more information is contained in the ubuntu wiki linked to from the site where I found the original information
Dude you are awesome, thank you for this!
Sent from my SPH-D700 using xda premium
Minor Correction
Well, I just realized that the script for 3.2 kernels didn't upload, but I can't get to my computer to fix that right now... so in the meantime, anyone who has upgraded to the 3.2 kernel can edit the 3.0 script
Two paths explicitly link to 3.0 directories, the just need to be changed to 3.2
Also, the path within the source code tree has changed - I will edit this post with the correct path momentarily, so stay tuned...
EDIT: I'm not sure what I was thinking about the path, but everything should be fine once both instances of "linux-source-3.0.0..." are edited to "...source-3.2.0"
Oh, and I renamed the patch file, so be sure to use the correct filename based on whether you download directly from the source or use the copy in my upload (identical aside from the filename)
Sent from my SPH-D700 using XDA
To clarify the bug here, the problem is that the Samsung Gingerbread USB gadget stack misspecifies a USB CDC union descriptor configuration that doesn't match what the device actually uses in RNDIS mode.
Windows, apparently, either ignores or doesn't care about the misconfiguration. Linux, while it's capable of detecting RNDIS interfaces in the absence of a CDC union description entirely, is "too strict" when the configuration is misspecified. So this patch makes Linux less strict in this regard.
So in short, the actual bug is in the device's kernel. But since RNDIS behavior is pretty much defined as "whatever Windows tolerates", it's reasonable and prudent to fix it on Linux USB hosts as well.
In any event, there's a few patches floating around for custom kernels to fix this problem on the device side, which is preferable as we don't really want to have to patch every Linux machine out there to deal with this issue. The one that we implemented for the CM9 kernel is here, and should've been included in our CM9 builds since alpha3 I believe.
Too true, I just haven't gotten around to figuring out how to patch the CM7 kernel yet so this works for me. Thanks for explaining the bug, so others will be aware that this is a workaround, not really a fix... I'll change the thread title, now that I think about it
Sent from my SPH-D700 using XDA
Yeah, there's a few changes in the CM9 kernel that need to be backported to CM7. Tortel is working on that now actually, so hopefully the next CM7 release will include the RNDIS fix among others.

Blob utility for AOSP-based ROMs

https://github.com/JackpotClavin/Android-Blob-Utility
The purpose of this program is to help AOSP-based ROM developers quickly and easily find out which proprietary blobs need to be copied into the ROM's build, or built using source. How the program works is you do a /system dump into a folder on a Linux computer. Then you make the program using the 'make' command; then you can run it.
First off, the program will ask you what the sdk version of the /system dump you pulled happens to be. For example, if your /system dump is Android 4.3, and intend port a 4.3-based ROM, then enter 18 and press enter.
When it prompts you for location of the /system dump you pulled, if the location of the build.prop of the /system dump is under:
Code:
/home/user/backup/dump/system/build.prop
then just use:
Code:
/home/user/backup/dump/system
The program will now ask you for your device's manufacturer's name, and the device's name. For my Verizon LG G2, I entered "lge" and "vs980" respectively.
The utility then will ask you how many files you wish to run through the program. In the case of my LG G2, the KitKat build requires two main proprietary camera-related libraries to run (/system/bin/mm-qcamera-daemon and
/system/lib/hw/camera.msm8974.so).
So I typed in 2 and pressed enter (because I'm running two proprietary files through the program)
Then simply typed in:
Code:
/home/user/backup/dump/system/bin/mm-qcamera-daemon
and pressed enter and it printed out *every* file needed to get /system/bin/mm-qcamera-daemon running (the file might be proprietary, or it can be built from source).
Then it asked for the final proprietary file, so I simply typed in:
Code:
/home/user/backup/dump/system/lib/hw/camera.msm8974.so
and pressed enter and it printed out *every* file needed to get /system/lib/hw/camera.msm8974.so running (the file might be proprietary, or it can be built from source).
An example usage of this program can be found here: https://raw.githubusercontent.com/JackpotClavin/Android-Blob-Utility/master/Example_Usage.txt
That's 106 proprietary blobs done in a flash!
The beauty of this program is that it's recursive, so if proprietary file 'A' needs proprietary file 'B' to run, but proprietary file 'B' needs proprietary file 'C' to run, which in turn needs 'D' to run, then simply entering proprietary file A to run will print out all A, B, C, and D nicely formatted so that you can simply copy the output and place it in a file under vendor/manufacturer/codename/codename-vendor-blobs.mk file in your AOSP build source tree's root.
Another great thing about this program is that it doesn't just catch the libraries needed to satisfy the linker, but rather, it will also print out those libraries that are called within the actual code of the library itself, like:
Code:
dlopen("libfoo.so", RTLD_NOW);
libfoo.so is not marked as a shared library, so the linker won't complain that libfoo.so is missing, and there might be no sign that libfoo.so missing and needed, but when it's time for the daemon or library to run, it won't show any sign that something is wrong, until you see that it doesn't work. This program will catch and display that libfoo.so is needed.
So basically:
1. Extract /system dump image
2. Tell program the SDK version of your /system dump
3. Tell program the location of your /system dump
4. Tell the program your device's manufacturer's name
5. Tell the program your device's codename
6. Tell program how many files you wish to run through the utility
7. Tell program the location of the file(s) you wish to run through the program.
8. Copy the output of the utility to a text file under vendor/manufacturer/codename/codename-vendor-blobs.mk
reserve
Hi,
I'm a noob and don't worry about my silly question.
I'm trying to build my first cm-rom and tested your tool. Thanks a lot for your work, it worked for me.
I'm a little bit curios about your point 5. Where can I find all the files I need for my own source-tree/device?
It would be nice if you can give me a hint.
Thanks a lot and greetings from germany
Greetings from the US
Do you mean the device folder the ROM? You can look at similar devices to your device and see what they did and make the changes to build Android.
This is the device folder for the Nexus 5 -> https://android.googlesource.com/device/lge/hammerhead
This tool is under-recognized. I think it's a really great way to find which blobs are dependencies!
Codename13 said:
This tool is under-recognized. I think it's a really great way to find which blobs are dependencies!
Click to expand...
Click to collapse
Thanks! Are you developing a ROM? Let me know if it helps!
Sent from my LG-VS980 using XDA Free mobile app
Could this be updated to Lolipop?
2GigayteSD said:
Could this be updated to Lolipop?
Click to expand...
Click to collapse
What do you mean? I added support for SDK version 20 if that's what you're asking.
Sent from my LG-VS980 using XDA Free mobile app
Does that mean I can port AOSP to any device just by getting all the necessary blobs? I'm not sure but I'm trying to port Lollipop to my device but I don't really have a clue how to do it/what's needed to do it. Will this be useful for me? Thanks.
cikoleko said:
Does that mean I can port AOSP to any device just by getting all the necessary blobs? I'm not sure but I'm trying to port Lollipop to my device but I don't really have a clue how to do it/what's needed to do it. Will this be useful for me? Thanks.
Click to expand...
Click to collapse
It helps with making ROMs for devices that don't have support (either the model is brand new or the device never gained AOSP ROM support for whatever reason)
Basically, in the early stages of porting ROMs, certain things won't work (graphics, camera, radio) and this is mostly due to not having the correct proprietary files needed for the OS to interact with the hardware. The proprietary files have dependencies (they rely on other libraries, which in turn may rely on other libraries, and so on and so forth until all proprietary libraries are satisfied).
In the case of my LG G2, there were a total of 92 proprietary files that needed to be pushed to the device in order to get just camera working. Instead of pushing one library at a time and getting a logcat or strace dump of what the daemons are calling or depend on, I wrote this program to recursively search for all proprietary libraries needed to satisfy a proprietary library (or in the case of the camera for my G2, there were two proprietary libraries needed that required those said 90 other proprietary blobs).
So rather than pushing libraries, (then gathering logs and stracing) and hoping that the one you just pushed is the one that will get your camera, radio, etc to work, you run your known proprietary daemons or libraries through this program and it will print out the necessary libraries to get it working, in a fraction of a second
Can you go through the actual "porting" process because from what I understand you have done it? If I'm correct to port a ROM you need to have working ROM from other device? If yes, does that device have to be same manufacturer? Lets say I do have working AOSPA kitkat for my device so I need to get AOSPA lollipop and exchange the certain files and then I'll able to run it? Once again if it's like that then I use your tool and get necessary blobs? I don't have a clue about this stuff, I only build ROMs but now time has come that my device is unsupported so can you give me some tips, thanks.
This is interesting. Going to have to try this out tomorrow.
cikoleko said:
Can you go through the actual "porting" process because from what I understand you have done it? If I'm correct to port a ROM you need to have working ROM from other device? If yes, does that device have to be same manufacturer? Lets say I do have working AOSPA kitkat for my device so I need to get AOSPA lollipop and exchange the certain files and then I'll able to run it? Once again if it's like that then I use your tool and get necessary blobs? I don't have a clue about this stuff, I only build ROMs but now time has come that my device is unsupported so can you give me some tips, thanks.
Click to expand...
Click to collapse
If you don't have a clue then dont do it, please! Work your way up. First step in this hypothetical is to wait for aospa 5.0
Thanks a lot for this tool
just one thing.. i cant get the blobs for my wireless (wl12xx)
Rest all done
andynoob said:
Thanks a lot for this tool
just one thing.. i cant get the blobs for my wireless (wl12xx)
Rest all done
Click to expand...
Click to collapse
Is it possible that each wl12xx library only relies on AOSP libraries (has no dependencies?)
See if they can be built from source!
Sent from my LG-VS980 using XDA Free mobile app
JackpotClavin said:
Is it possible that each wl12xx library only relies on AOSP libraries (has no dependencies?)
See if they can be built from source!
Sent from my LG-VS980 using XDA Free mobile app
Click to expand...
Click to collapse
Manufacturer hasnt provided the source code(Kernel) . Anyways thanks a lot for this tool :good: :good:
how to use it?
by reading the detailed instructions?
Sent from my LG-VS980 using XDA Free mobile app
JackpotClavin said:
by reading the detailed instructions?
Sent from my LG-VS980 using XDA Free mobile app
Click to expand...
Click to collapse
should we adb pull /system first?
*edit
I did it! but where is the directory out?
J,
You are a life saver ! Subscribed. Will add link of thread to my signature. Will dance happily for some hours! :good:
Will seek therapy. :silly:
m

Categories

Resources