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

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

Related

JFv1.31 Released! (updated 01-03-09)

Update (01-03-09)
v1.31 is out! This is a minor bugfix release to fix a few issues that had cropped up in v1.3.
The changes from v1.3 include:
Fixed the nandroid backup so that it works on sdcards with a raw fat32 filesystem (with no partition)
Added the telnetd binary from RC28
Fixed an issue with SuperUser where it was displaying the wrong processes in the su request popup
SuperUser should allow root to use su without displaying the popup (though there's not much point.. )
Added /system/modules and /system/xbin to fstab in normal and recovery mode
Minor fix for the update-script, so the progress bar acts more sanely
I have the usual RC30 and RC8 versions, and new for v1.3 is an ADP1 version.
ADP1: (md5: 96b2abd9a1da2852bc33b2052ea51b2a)
http://android-dls.com/forum/index.php?f=24&t=223&rb_v=viewtopic
http://www.gotontheinter.net/content/new-images-jf (at bottom of page)
RC30: (md5: 0f2e6a4244410e00028db55b4fbf808c)
http://android-dls.com/forum/index.php?f=24&t=223&rb_v=viewtopic
http://www.gotontheinter.net/content/new-images-jf (at bottom of page)
RC8: (md5: e008bbe1d93abd0c2e5e6218f012f20d)
http://android-dls.com/forum/index.php?f=24&t=223&rb_v=viewtopic
http://www.gotontheinter.net/content/new-images-jf (at bottom of page)
These updates are installed the normal way. Save them to your sdcard named update.zip, boot into recovery mode (home + power), and then press alt+l and alt+s. If you are switch between versions, e.g. from RC30 to ADP1, then it's usually a good idea to perform a wipe. You can try booting up without a wipe, but if it doesn't boot, or you get strange errors once it boots up, go back into recovery and perform a wipe (alt+w)
Note: To install these updates, you need to have a recovery image that uses test keys. If any of the following are true, you most likely have a recovery image that uses test keys
- you have installed my modified recovery image in the past
- you have an ADP1
- you currently have one of my modified firmwares installed
What's new?
The coolest new functionality in v1.3 is a new backup utility that allows you to perform a backup directly from recovery mode with alt+B. This is done using infernix's and brainaid's nandroid script, which they kindly modified to work in recovery mode. Let them know what you think . The backups are stored in a subfolder in the nandroid folder on your sdcard. To restore them, you have to copy them to your computer, and then flash them with the fastboot tool (sorry, no integrated restore yet).
If you get errors when making a backup, first make sure you have enough free space on the sdcard. it needs around 85-90mb. If you have enough space, then try reformatting the sdcard (fat32 is your best bet).
Other changes of note include
This version includes a new busybox binary that I compiled against uclibc, making it much smaller (1.8mb vs 700kb).
All busybox applets are linked at /system/xbin/bb, which is also in the path. So there are many more standard unix commands available in the terminal.
Many more modules and binaries are included in /system/xbin and /system/modules. They were also optimized for size, so even though there are more modules and binaries, they actually take up much less space than they did on v1.2
I added the terminal emulator application to /system/app. (don't worry, it won't, or at least shouldn't , cause any problems if you already have it installed)
got rid of the normal su binary, in favor of koush's su and SuperUser application. See details here
when you boot up into recovery, it will automatically show the text. You can press alt+L to turn off the text and ogle the background. (did I mention there's a new background? shhh. it's a secret )
fixed the annoying uptime bug, where the uptime is shown incorrectly in the settings
added /data/local/bin to the path. Feel free to add your own binaries/scripts here.
includes the /dev/mtd/mtd6 and /dev/mtd/mtd6ro devices, which allow access to the entire flash chip (other than certain restricted areas used by the radio)
new "ro.modversion" property, that is set to "JFv1.3". The intent of this property is so you can know you are running a modified version, as well as identify which version
added a modified /system/etc/security/cacerts.bks file, which contains additional certificates for cacert.org (courtesy of Disconnect)
added a /system/etc/resolv.conf file with the 4.2.2 family of DNS servers, to allow busybox's ping, wget, etc. to resolve host names
See the attached change logs for a complete list of changes with respect to the corresponding "official" firmware.
---------------
Update (01-03-09): Updated the links to point to the v1.31 versions
In addition to the updates themselves, I am also releasing a build environment that can use to build each update from scratch. You can use these to easily make your own custom updates. It includes some utilities that were built from git source. The binaries are for 32bit x86 linux. If you want to run it on a different platform, you're on your own.
NOTE: You don't need these to use my update. Just download one of the updates from above and install it. The build environments are only if you want to make your own customized update.
The general idea of the build environment is that it extracts the original files from the official update (or from my original ADP1 update), and then copies over anything from the various ModifiedFiles folders, then packages it all back up into a ready-to-be-applied update.zip. It does this for the boot image, recovery image and system folder. You can also specify files to delete in the various OriginalFilesToDelete.mk files.
Consider anything new that I created for the build environments (the makefiles, etc.) to be in the public domain. Everything else retains its original license of course.
Instructions:
- extract the build environment into a folder
- download the official update that the update is based on, and put it in the root of the build environment. (note: use my original ADP1 update for the ADP1 build environment. available on this page)
- run make as root. yes, it has to be with root, because the binaries in the 2 cramfs images should be owned by root. (note: I plan on using fakeroot in the future, to workaround the need to be root)
- after make finishes, assuming there are no errors, the update should be in Workspace/update.zip.
Download the build environments here:
ADP1: (md5: 2d116b334515d4d702776b9d74d2e658)
http://android-dls.com/forum/index.php?f=24&t=223&rb_v=viewtopic
http://www.gotontheinter.net/content/new-images-jf (at bottom of page)
RC30: (md5: 29ced6e7601bac47252e51e5ac4f0ca4)
http://android-dls.com/forum/index.php?f=24&t=223&rb_v=viewtopic
http://www.gotontheinter.net/content/new-images-jf (at bottom of page)
RC8: (md5: b26f3cd244da9b8662766db69734000e)
http://android-dls.com/forum/index.php?f=24&t=223&rb_v=viewtopic
http://www.gotontheinter.net/content/new-images-jf (at bottom of page)
Sweet! great timing JF works like a dream!
Btw, love the new recovery background...I feel seizures coming on...
Stericson
Fantastic! Been waiting for your update, looking forward to it. THanks JF and others who made this possible!
Thanks for the great work!!!
Awesome, thanks!
So what would we need to do to replace the browser with Koush's auto-rotating version and how about replacing the alarm clock with Klaxon?
This is awesome! a little pre 2009 present! thanks JF for all that you do !!!
Just posting to say this update worked a-ok for me. Thanks JF for changing busybox and for the new su.
s0niqu3 said:
Awesome, thanks!
So what would we need to do to replace the browser with Koush's auto-rotating version and how about replacing the alarm clock with Klaxon?
Click to expand...
Click to collapse
Download the build environment for the version you want, extract it, put the klaxon and browser apk into system/ModifiedFiles/system/app, put in a delete entry into system/ModifiedFiles/OriginalFilesToDelete.mk for the alarm apk and odex, then run make as root.
JesusFreke said:
Download the build environment for the version you want, extract it, put the klaxon and browser apk into system/ModifiedFiles/system/app, put in a delete entry into system/ModifiedFiles/OriginalFilesToDelete.mk for the alarm apk and odex, then run make as root.
Click to expand...
Click to collapse
Will this work on windows vista with cygwin as opposed to a full linux VM?
Are there any specific binaries I need to install?
thanks again!
one last comment... love the Alt+B i know B is supposed to be for backup, but in my mind it stands for BADASS!!!!!!
s0niqu3 said:
Will this work on windows vista with cygwin as opposed to a full linux VM?
Are there any specific binaries I need to install?
thanks again!
Click to expand...
Click to collapse
JesusFreke said:
The binaries are for 32bit x86 linux. If you want to run it on a different platform, you're on your own.
Click to expand...
Click to collapse
You might be able to get it to work. You'll need to replace the linux binaries in the tools folder with windows equivalents.
But tbh, you're best bet is to install vmware and get an ubuntu VM running.
Did a quick search and could not find what ADP1 is. Is this the developer version?
JesusFreke said:
In addition to the updates themselves, I am also releasing a build environment that can use to build each update from scratch. You can use these to easily make your own custom updates. It includes some utilities that were built from git source. The binaries are for 32bit x86 linux. If you want to run it on a different platform, you're on your own.
The general idea of the build environment is that it extracts the original files from the official update (or from my original ADP1 update), and then copies over anything from the various ModifiedFiles folders, then packages it all back up into a ready-to-be-applied update.zip. It does this for the boot image, recovery image and system folder. You can also specify files to delete in the various OriginalFilesToDelete.mk files.
Consider anything new that I created for the build environments (the makefiles, etc.) to be in the public domain. Everything else retains its original license of course.
Click to expand...
Click to collapse
I applaud you, sir.
momentarylapseofreason said:
Did a quick search and could not find what ADP1 is. Is this the developer version?
Click to expand...
Click to collapse
ADP1 stands for Android Dev Phone 1.
jashsu said:
ADP1 stands for Android Dev Phone 1.
Click to expand...
Click to collapse
What I figured.... thanks!
JesusFreke said:
You might be able to get it to work. You'll need to replace the linux binaries in the tools folder with windows equivalents.
But tbh, you're best bet is to install vmware and get an ubuntu VM running.
Click to expand...
Click to collapse
Ah, thanks for the confirmation.
Is there anyone out there that can tackle this for me? I'm visiting family through the 5th, and don't feel right installing a linux VM on their computer.
If so, PM me, and I can give you the specifics, but really all I'd like is for the alarm clock to be removed and replaced with Klaxon, and for the browser to be replaced with koush's build that auto-rotates.
This would be for a G1 RC30 build.
Cheers, and thanks in advance!
jashsu said:
I applaud you, sir.
Click to expand...
Click to collapse
I stand.. applauded?
Thanks!
Thanks JF, I just flashed the ADP1 version and it is working great so far.
Have you attempted to add in the MyFaves app to the ADP build? I had tried a couple of things previously, but I was running into some errors. I may try it with your new build environment later if it is something you haven't attempted.
BTW - for those looking for a virtualized Linux environment, I also recommend Sun's Virtualbox (http://www.virtualbox.org/). It is free for personal use and provides a lot of the functionality that you get from the paid versions of VMWare. In fact, some things seem to run smoother when running Linux virtualized on Vista 64bit; i.e. I can get copy/paste between OSes and auto-resizing guest screens without a lot of extra hassle. Just make sure that you read up on how to use the USB virtualization so you can create the filter for the phone as a USB device.
Great work once again JesusFreke!
-Brint
s0niqu3 said:
Ah, thanks for the confirmation.
Is there anyone out there that can tackle this for me? I'm visiting family through the 5th, and don't feel right installing a linux VM on their computer.
If so, PM me, and I can give you the specifics, but really all I'd like is for the alarm clock to be removed and replaced with Klaxon, and for the browser to be replaced with koush's build that auto-rotates.
This would be for a G1 RC30 build.
Cheers, and thanks in advance!
Click to expand...
Click to collapse
You can always do it manually of course. Install the update, then remount the system as rw, then delete the alarm apk and odex and the browser apk and odex from /system/app, and copy the klaxon and modified browser apk to /system/app
JF!!! You... are a scholar and a gentleman... A happy new year to you...
s0niqu3 said:
Is there anyone out there that can tackle this for me? I'm visiting family through the 5th, and don't feel right installing a linux VM on their computer.
Click to expand...
Click to collapse
Couldn't you also use an Ubuntu LiveCD just as easily? That would allow temporary access to a 'nix environment without touching the existing drive, mount one of the partitions temporarily for your make environments. Just a thought...

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

[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

[MOD]SplashInjector[OP3/T]

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

Categories

Resources