Modify android_winusb.inf for the 70b IT with ADB - Gen9 Android Development

If you have the new 7 It with android 3.2 or android 2.2
for use ADB
add on your android_winusb.inf
Search [Google.NTx86]
Search ;Archos Gen8
Add those two lines
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1569
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1569&MI_01
and also
Search [Google.NTamd64]
Search ;Archos Gen8
Add those two lines
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1569
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1569&MI_01
and save the file !
Enjoy !!

Related

[Guide] Unlock your bootloader

WARNING
This process will factory reset your device and wipe the internal memory.
You do this at your own risk. I advise you NOT TO DO THIS as there are risks involved, including, but not limited to, bricking your brand new tablet and renderingit useless. You also may void the warranty. I take NO RESPONSIBILITY for any damage. Again, if you decide to follow these steps, it is entirely at your own risk
Prepare:
If you're a Windows user, you might want to refer here. Chainfire has posted an updated stock ROM which does the unlocking for you. If you're a Linux user, you could try flashing Chainfires image using Heimdall but AFAIK, this has not been tested.
Method 1
Download and install the JAVA SDK from here http://www.oracle.com/technetwork/java/javase/downloads/index.html
Download the Android SDK from here http://developer.android.com/sdk/index.html
Follow the instructions here to download the USB drivers http://developer.android.com/sdk/installing.html
Edit the “<PATH TO ANDROID SDK>\extras\google\usb_driver\android_winusb.inf” file and copy/paste the following lines and add them to the [Google.NTx86] section (for 32bit Windows) and/or [Google.NTamd64] (for 64bit Windows).
Download the fastboot zip attached to this post (includes both Win and Linux version) and extract the files to your "<PATH TO ANDROID SDK>\tools" folder
***Do not leave any blank lines before the first “;”
Code:
;
;Galaxy Tab 10.1v
%SingleAdbInterface% = USB_Install, USB\VID_04E8&PID_6860&REV_9999&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_04E8&PID_6860&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_04E8&PID_6601
%SingleAdbInterface% = USB_Install, USB\VID_0955&PID_7000
Now to get started…
1) Power off your tablet
2) Hold the VOLUME DOWN button and press the POWER button (your tablet will power on and you will see the BACKUP and USB icons)
3) Use VOLUME DOWN to select the USB icon, and then press VOLUME UP to confirm the selection.
4) You should now be in fastboot mode (the word FASTBOOT should appear somewhere in the top left corner)
5) If Windows doesn’t automatically detect the device, go to device manager and find the ‘Fastboot’ device. Right-click and select update driver, choose to manually install and browse to the “<PATH TO ANDROID SDK>\extras\google\usb_driver\” folder.
6) Open a command prompt and do
Code:
cd "<PATH TO SDK FOLDER>\tools"
fastboot devices
7) Confirm that your device is detected. If it says “waiting for device”, you need to check that the drivers are installed correctly.
8) In the Command window, type:
Code:
fastboot oem unlock
9) On your Tab, Use the VOLUME DOWN button to select YES and then press VOLUME UP to confirm
10) VIOLA! You are unlocked. Note that these instructions are a work-in-progress. As always, your questions and comments are welcome. OSX / Linux instructions coming soon!
Linux Instructions (thanks to Draco32)
Get your Tab into fastboot mode;
1) Power off your Tab and power it back on while holding VOLUME DOWN
2) Highlight the USB icon by pressing VOLUME DOWN
3) Press VOLUME UP to confirm your selection (Fastboot Mode)
4) Download the Tegra 2 compatible fastboot (attached to this post) and put it somewhere in your path (eg /usr/bin)
5) Plug your device into the PC using the provided USB cable.
6) Open a terminal and type
Code:
fastboot devices
this will list the device but it will be a strign of numbers
7) type
Code:
fastboot oem unlock
your tab will then have a yes no option to unlock the bootloader select yes with VOLUME DOWN, and press VOLUME UP to confirm
8) Your bootloader is now unlocked power off the device and power it back on the device will boot and have an unlocked padlock when loading. Also this will factory reset your device this includes everything on the 16 gb storage.
Now that you're done head over here to get root access.
EDIT:
ORIGINAL POST:
Guide for unlocking is here:
http://411technology.wordpress.com/
If you power off your device and power it on again using the volume rocker (NOT THE POWER BUTTON), you get the OEM unlock Screen.
Looks like we might have an unlockable bootloader. If so, I love this thing even more now!
Im off to play with it now. Will be back to post pics shortly. Text from the screen is below
Left:
ODIN3 Download Mode
(Protocol v2)
Reason: Force Key
Secure Mode: Secure
Check Signature: Check
OEM Lock: Lock
Waiting USB Cable...
Click to expand...
Click to collapse
Right Hand Side:
Unlock Bootloader?
-------------------------------
If you unlock the bootloader.....
Click to expand...
Click to collapse
(continues on with crap about the risks etc)
Will post pics shortly. Time to break this thing
Fastboot Windows Driver INF File (Galaxy Tab 10.1/v ONLY!)
Code:
;
; Android WinUsb driver installation.
;
[Version]
Signature = "$Windows NT$"
Class = AndroidUsbDeviceClass
ClassGuid = {3F966BD9-FA04-4ec5-991C-D326973B5128}
Provider = %ProviderName%
DriverVer = 12/06/2010,4.0.0000.00000
CatalogFile.NTx86 = androidwinusb86.cat
CatalogFile.NTamd64 = androidwinusba64.cat
;
; This section seems to be required for WinUsb driver installation.
; If this section is removed the installer will report an error
; "Required section not found in INF file".
;
[ClassInstall32]
Addreg = AndroidWinUsbClassReg
[AndroidWinUsbClassReg]
HKR,,,0,%ClassName%
HKR,,Icon,,-1
[Manufacturer]
%ProviderName% = Google, NTx86, NTamd64
[Google.NTx86]
;Galaxy Tab 10.1v
%SingleAdbInterface% = USB_Install, USB\VID_04E8&PID_6860&REV_9999&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_04E8&PID_6860&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_04E8&PID_6601
%SingleAdbInterface% = USB_Install, USB\VID_0955&PID_7000
[Google.NTamd64]
;Galaxy Tab 10.1v
%SingleAdbInterface% = USB_Install, USB\VID_04E8&PID_6860&REV_9999&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_04E8&PID_6860&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_04E8&PID_6601
%SingleAdbInterface% = USB_Install, USB\VID_0955&PID_7000
[USB_Install]
Include = winusb.inf
Needs = WINUSB.NT
[USB_Install.Services]
Include = winusb.inf
AddService = WinUSB,0x00000002,WinUSB_ServiceInstall
[WinUSB_ServiceInstall]
DisplayName = %WinUSB_SvcDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WinUSB.sys
[USB_Install.Wdf]
KmdfService = WINUSB, WinUSB_Install
[WinUSB_Install]
KmdfLibraryVersion = 1.9
[USB_Install.HW]
AddReg = Dev_AddReg
[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{F72FE0D4-CBCB-407d-8814-9ED673D0DD6B}"
[USB_Install.CoInstallers]
AddReg = CoInstallers_AddReg
CopyFiles = CoInstallers_CopyFiles
[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01009.dll,WdfCoInstaller","WinUSBCoInstaller2.dll"
[CoInstallers_CopyFiles]
WinUSBCoInstaller2.dll
WdfCoInstaller01009.dll
[DestinationDirs]
CoInstallers_CopyFiles=11
[SourceDisksNames]
1 = %DISK_NAME%,,,\i386
2 = %DISK_NAME%,,,\amd64
[SourceDisksFiles.x86]
WinUSBCoInstaller2.dll = 1
WdfCoInstaller01009.dll = 1
[SourceDisksFiles.amd64]
WinUSBCoInstaller2.dll = 2
WdfCoInstaller01009.dll = 2
[Strings]
ProviderName = "Google, Inc."
SingleAdbInterface = "Android ADB Interface"
CompositeAdbInterface = "Android Composite ADB Interface"
SingleBootLoaderInterface = "Android Bootloader Interface"
WinUSB_SvcDesc = "Android USB Driver"
DISK_NAME = "Android WinUsb installation disk"
ClassName = "Android Phone"
Correct the title - instead of unlockable should be unlocked.
BTW, what's the advantage?
bcmobile said:
EDIT:
Guide for unlocking is here:
http://411technology.wordpress.com/
If you power off your device and power it on again using the volume rocker (NOT THE POWER BUTTON), you get the OEM unlock Screen.
Click to expand...
Click to collapse
It would appear the SGT 10.1v is another Samsung device with a "3 button recovery" lottery. I have been trying every combo of hardware keys from powered off state on mine and am unable to get the screen you have descibed.
I can however get into a "download mode" (Picture of an android dude doing "road works" and a flashing USB symbol with the word "Downloading") on my device - by pressing the power button and then an instant later pressing the left side of the volume rocker (doesn't seem to work if you press them simultaniously).
Hopefully a smart cookie will figure out a way to put a different firmware in with Odin to enable these options on devices like mine (much like the 3BR fix for the SGS).
Edit - Nevermind, got into it. For me it was Press Power, then an instant later volume left and hold both. When you see a screen with a android dude and a usb symbol - pressing right volume gives you the unlock screen, pressing right volume highlights the USB then pressing right volume to select it puts the device in "fastboot" mode.
Woo hoo!!
myself11 said:
Correct the title - instead of unlockable should be unlocked.
BTW, what's the advantage?
Click to expand...
Click to collapse
Since it is not shipped as unlocked, I actually think unlockable is more appropriate
Advantage is that you can flash unsigned ROMs - no hacks required. This is normally only found on the Nexus handsets so it's a pretty big deal for Devs / hackers.
Hi Guys,
I am unable to get the fastboot drivers working. I can install them correctly. ADB devices appears in device manager but when i type i get nothing back. It's like the fastboot device is not connected?
Do i need a newer version of the SDK?
For some reason SDK manager is not working on my PC at work so i am using an older sdk version.
D:\adbsdkold\android-sdk-windows-1.5_r3\tools>fastboot devices
D:\adbsdkold\android-sdk-windows-1.5_r3\tools>fastboot oem unlock
< waiting for device >
^C
Draco32 said:
Hi Guys,
I am unable to get the fastboot drivers working. I can install them correctly. ADB devices appears in device manager but when i type i get nothing back. It's like the fastboot device is not connected?
Do i need a newer version of the SDK?
For some reason SDK manager is not working on my PC at work so i am using an older sdk version.
D:\adbsdkold\android-sdk-windows-1.5_r3\tools>fastboot devices
D:\adbsdkold\android-sdk-windows-1.5_r3\tools>fastboot oem unlock
< waiting for device >
^C
Click to expand...
Click to collapse
If you look at the response from "fastboot devices" command it cannot see any devices.
Post your anroid_winusb.inf (\android-sdk-windows\extras\google\usb_driveranroid_winusb.inf) may just be entered in wrong section/misspell
Also what state is it in? your device might just not be in fastboot
P.S. update your SDK no reason not to
Android Driver
Hey,
I'm using the Nexus S driver thats probably the issue. It reads like this at present.
Can you upload the Google USB drivers as the SDK doesn't seem to be working for me.
--------------------android_winusb.inf------------------------------------------
;
; Android WinUsb driver installation.
;
[Version]
Signature = "$Windows NT$"
Class = AndroidUsbDeviceClass
ClassGuid = {3F966BD9-FA04-4ec5-991C-D326973B5128}
Provider = %ProviderName%
DriverVer = 12/06/2010,4.0.0000.00000
CatalogFile.NTx86 = androidwinusb86.cat
CatalogFile.NTamd64 = androidwinusba64.cat
;
; This section seems to be required for WinUsb driver installation.
; If this section is removed the installer will report an error
; "Required section not found in INF file".
;
[ClassInstall32]
Addreg = AndroidWinUsbClassReg
[AndroidWinUsbClassReg]
HKR,,,0,%ClassName%
HKR,,Icon,,-1
[Manufacturer]
%ProviderName% = Google, NTx86, NTamd64
[Google.NTx86]
; HTC Dream
%SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C01
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C02&MI_01
%SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&PID_0FFF
; HTC Magic
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C03&MI_01
;
;Moto Sholes
%SingleAdbInterface% = USB_Install, USB\VID_22B8&PID_41DB
%CompositeAdbInterface% = USB_Install, USB\VID_22B8&PID_41DB&MI_01
;
;Google NexusOne
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E11
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E12&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E22&MI_01
;
;Galaxy Tab 10.1v
%SingleAdbInterface% = USB_Install, USB\VID_04E8&PID_6860&REV_9999&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_04E8&PID_6860&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_04E8&PID_6601
%SingleAdbInterface% = USB_Install, USB\VID_0955&PID_7000
[Google.NTamd64]
; HTC Dream
%SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C01
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C02&MI_01
%SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&PID_0FFF
; HTC Magic
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C03&MI_01
;
;Moto Sholes
%SingleAdbInterface% = USB_Install, USB\VID_22B8&PID_41DB
%CompositeAdbInterface% = USB_Install, USB\VID_22B8&PID_41DB&MI_01
;
;Google NexusOne
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E11
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E12&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E22&MI_01
[USB_Install]
Include = winusb.inf
Needs = WINUSB.NT
[USB_Install.Services]
Include = winusb.inf
AddService = WinUSB,0x00000002,WinUSB_ServiceInstall
[WinUSB_ServiceInstall]
DisplayName = %WinUSB_SvcDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WinUSB.sys
[USB_Install.Wdf]
KmdfService = WINUSB, WinUSB_Install
[WinUSB_Install]
KmdfLibraryVersion = 1.9
[USB_Install.HW]
AddReg = Dev_AddReg
[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{F72FE0D4-CBCB-407d-8814-9ED673D0DD6B}"
[USB_Install.CoInstallers]
AddReg = CoInstallers_AddReg
CopyFiles = CoInstallers_CopyFiles
[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01009.dll,WdfCoInstaller","WinUSBCoInstaller2.dll"
[CoInstallers_CopyFiles]
WinUSBCoInstaller2.dll
WdfCoInstaller01009.dll
[DestinationDirs]
CoInstallers_CopyFiles=11
[SourceDisksNames]
1 = %DISK_NAME%,,,\i386
2 = %DISK_NAME%,,,\amd64
[SourceDisksFiles.x86]
WinUSBCoInstaller2.dll = 1
WdfCoInstaller01009.dll = 1
[SourceDisksFiles.amd64]
WinUSBCoInstaller2.dll = 2
WdfCoInstaller01009.dll = 2
[Strings]
ProviderName = "Google, Inc."
SingleAdbInterface = "Android ADB Interface"
CompositeAdbInterface = "Android Composite ADB Interface"
SingleBootLoaderInterface = "Android Bootloader Interface"
WinUSB_SvcDesc = "Android USB Driver"
DISK_NAME = "Android WinUsb installation disk"
ClassName = "Android Phone"
Yer that looks correct for a 32bit-OS but if your running 64bit-OS put it under "Google.NTamd64"
Also make sure you follow the guide bcmobile post to the letter to get into fastboot
Power off your tablet
Press the VOLUME DOWN button (your tablet will power on and you will see the BACKUP and USB icons)
Use VOLUME UP to select the USB icon, and then press VOLUME DOWN to select it.
You should now be in fastboot mode (the word FASTBOOT should appear somewhere in the top left corner)
If your computer doesn't automatically detect the device, go to device manager and find the 'Fastboot' device. Right-click and select update driver, choose to manually install and browse to the "C:\android-sdk-windows\extras\google\usb_driver\" folder.
Click to expand...
Click to collapse
50-3 said:
Yer that looks correct for a 32bit-OS but if your running 64bit-OS put it under "Google.NTamd64"
Also make sure you follow the guide bcmobile post to the letter to get into fastboot
Click to expand...
Click to collapse
Followed the guide correctly i have fast boot coming up on the tablet just no devices are shown when i do fast boot devices i will have a look when i get home.
Also the part of the guide where it says Volume Up to move it over to the USB icon is incorrect. It's actually Volume Down to move to the USB icon when selecting the fastboot option.
Cheers,
Adrian
Draco32 said:
Followed the guide correctly i have fast boot coming up on the tablet just no devices are shown when i do fast boot devices i will have a look when i get home.
Also the part of the guide where it says Volume Up to move it over to the USB icon is incorrect. It's actually Volume Down to move to the USB icon when selecting the fastboot option.
Cheers,
Adrian
Click to expand...
Click to collapse
Well if you have the right driver file config and in fastboot only thing left i can think of is that windows hasn't been told to use the driver
If your computer doesn't automatically detect the device, go to device manager and find the 'Fastboot' device. Right-click and select update driver, choose to manually install and browse to the "C:\android-sdk-windows\extras\google\usb_driver\" folder.
Click to expand...
Click to collapse
Or it's an old version of SDK tools but i do think that is it.
Anyway sorry i couldn't have been more help
Draco32 said:
Followed the guide correctly i have fast boot coming up on the tablet just no devices are shown when i do fast boot devices i will have a look when i get home.
Also the part of the guide where it says Volume Up to move it over to the USB icon is incorrect. It's actually Volume Down to move to the USB icon when selecting the fastboot option.
Cheers,
Adrian
Click to expand...
Click to collapse
Go into device manager and find the fastboot device. Right click and uninstall it. Unplug the tab and Reboot your PC. Put your tab into fastboot mode before reconnecting
Thanks for pointing out the vol up / down error. I had the old galaxy tab which had them the other way around since it was designed to be used in portrait mode. Ill correct it in the guide later tonight.
Sent from my GT-P7100 using XDA Premium App
bcmobile said:
Advantage is that you can flash unsigned ROMs - no hacks required. This is normally only found on the Nexus handsets so it's a pretty big deal for Devs / hackers.
Click to expand...
Click to collapse
Noob question: but we will still need devs that cook ROM's, right? It isn't as simple as grab Google's update and install it on 10.1v, is it?
myself11 said:
Noob question: but we will still need devs that cook ROM's, right? It isn't as simple as grab Google's update and install it on 10.1v, is it?
Click to expand...
Click to collapse
Unfortunately no, But if were lucky the Devs will push them out quickly
Hi Everyone,
Just to let you know i managed to unlock the bootloader. I used ubuntu linux and fastboot method to get it unlocked.
Get your Tab into fastboot mode;
1. Power + Volume Down
2. Highlight the USB icon by pressing Volume Down
3. Press Volume Up to select the USB icon (Fastboot Mode)
Download the Tegra 2 compatible fastboot from this threadhttp://forum.xda-developers.com/showthread.php?t=1055754;
1. Plug your device into the PC using the provided USB cable.
2. open a terminal and type fastboot devices this will list the device but it will be a strign of numbers
3. type "fastboot oem unlock" your tab will then have a yes no option to unlock the bootloader select yes with Volume Up
5. Your bootloader is now unlocked power off the device and power it back on the device will boot and have an unlocked padlock when loading. Also this will factory reset your device this includes everything on the 16 gb storage.
Cheers,
Draco
A little off-topic, but didn't want to open a new topic: is australian radio version different from european version?
Draco32 said:
Hi Everyone,
...
5. Your bootloader is now unlocked power off the device and power it back on the device will boot and have an unlocked padlock when loading. Also this will factory reset your device this includes everything on the 16 gb storage.
Click to expand...
Click to collapse
Hi everybody,
I received my 10.1v yesterday (Vodafone, Germany) and have noticed that it allready boots with an unlocked padlock. Does this mean that I have an allready unlocked Tab? This is strange ...
smack said:
Hi everybody,
I received my 10.1v yesterday (Vodafone, Germany) and have noticed that it allready boots with an unlocked padlock. Does this mean that I have an allready unlocked Tab? This is strange ...
Click to expand...
Click to collapse
Cool!
Yes that should mean it's unlocked. Apparently the 10.1 is shipping unlocked as well so I guess I shouldn't be surprised.
If you want to be sure, go into fastboot mode using steps 1-4 above and it should say:
Lock State: UNLOCKED
...on the fastboot screen
unlucky, if I Hold the VOLUME DOWN button and press the POWER button , the tablet goes to the normal UI, I cannot understand.......
I did not see anything about BACKUP and USB icons
For those who are having diffficulties unlocking the bootloader, follow all steps mentioned in the guide, and then enter the device in USB mode but don't plug it to the pc.
Open the cmd and type:
cd "<PATH TO SDK FOLDER>\tools"
fastboot devices
fastboot oem unlock (and it will appear a notification saying waiting for device)
Only nows, in USB mode, plug the tab to the PC.
After that choose in the tab "yes" and your bootloader is unlocked.
Hope this could help!

Tell me if this guide will work (usb driver guide)

It should work, however I'm not sure because my archos is at the factory for repair. please tell me if the guide looks accurate or if it will work. Based the guide off of one from google, one from archos, and took a peak at quinnys. I used the usb drivers from archos and not the one from quinny's post because I think they are the same..
Guide based for windows 7
i put <device> because i dont know how the device appears in device manager, if you know how it appears please let me know
STEP 1: Install adb driver
Step 1: Download and extract adb_winusb_driver to a location you will remember.
Step 2: On your G9, go into Settings
IF you are running Honeycomb: press Applications > Development and check the box "USB debugging" and accept the warning
IF you are running Ice Cream Sandwich: press Devolper Options and check the box "USB debugging" and accept the warning
Step 2: Connect your G9 to your computer's USB port.
Step 3: Right-click on Computer from your desktop or Windows Explorer, and select Manage.
Step 4: Select "Devices" or "Device Manager" in the left pane.
Step 5: Locate and expand Other device in the right pane.
Step 6: Right-click the <device> and select "Update Driver Software..." This will launch the Hardware Update Wizard.
Step 7: Select "Browse my computer for driver software"
Step 8: Type the path to wherever you extracted the drivers you just downloaded (i.e. C:\adb_winusb_driver\usb_driver) in the box below "Search for driver software in this location:"
Step 9: Click Next to install the driver.
If you get a notification that says driver is not signed or something similar, continue anyways. It should not harm your device or PC.
Step 9: Close any open window you are not using and open a command prompt (press winkey+r or type in cmd in startmenu search)
Step 10: Once a command prompt window is open, type (one line at a time. Press enter after each line)
Code:
echo 0x0e79 >> "%USERPROFILE%\.android\adb_usb.ini"
adb kill-server
adb devices
anyone?
1. It will be clearer if you'd use 'a) honeycomb' and 'b) ICS' instead of 'if you are running....'
2. Does linked driver has both pid's for honeycomb and isc in .inf file? they are different (1621 and 1629 IIRC)
Tapatalked from Xperia Arc S
gen_scheisskopf said:
1. It will be clearer if you'd use 'a) honeycomb' and 'b) ICS' instead of 'if you are running....'
2. Does linked driver has both pid's for honeycomb and isc in .inf file? they are different (1621 and 1629 IIRC)
Tapatalked from Xperia Arc S
Click to expand...
Click to collapse
this is the inf
Code:
;
; Android WinUsb driver installation.
;
[Version]
Signature = "$Windows NT$"
Class = AndroidUsbDeviceClass
ClassGuid = {3F966BD9-FA04-4ec5-991C-D326973B5128}
Provider = %ProviderName%
DriverVer = 12/06/2010,4.0.0000.00000
CatalogFile.NTx86 = androidwinusb86.cat
CatalogFile.NTamd64 = androidwinusba64.cat
;
; This section seems to be required for WinUsb driver installation.
; If this section is removed the installer will report an error
; "Required section not found in INF file".
;
[ClassInstall32]
Addreg = AndroidWinUsbClassReg
[AndroidWinUsbClassReg]
HKR,,,0,%ClassName%
HKR,,Icon,,-1
[Manufacturer]
%ProviderName% = Google, NTx86, NTamd64
[Google.NTx86]
; HTC Dream
%SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C01
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C02&MI_01
%SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&PID_0FFF
; HTC Magic
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C03&MI_01
;
;Moto Sholes
%SingleAdbInterface% = USB_Install, USB\VID_22B8&PID_41DB
%CompositeAdbInterface% = USB_Install, USB\VID_22B8&PID_41DB&MI_01
;
;Google NexusOne
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E11
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E12&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E22&MI_01
; Archos Gen7
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1361
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1361&MI_01
; Archos HT
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1401
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1401&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1407
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1407&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1409
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1409&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_140B
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_140B&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_140E
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_140E&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1431
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1431&MI_01
;Archos Gen8
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1411
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1411&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1569
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1569&MI_01
;Archos Gen9
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1501
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1502&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1504&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1506&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1507&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1509&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_150A&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1511
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1512&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1514&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1516&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1517&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1519&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_151A&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1521
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1522&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1524&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1526&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1527&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1529&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_152A&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1531
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1532&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1534&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1536&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1537&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1539&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_153A&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1541
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1542&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1544&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1546&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1547&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1549&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_154A&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1551
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1552&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1554&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1556&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1557&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1559&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_155A&MI_01
[Google.NTamd64]
; HTC Dream
%SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C01
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C02&MI_01
%SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&PID_0FFF
; HTC Magic
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C03&MI_01
;
;Moto Sholes
%SingleAdbInterface% = USB_Install, USB\VID_22B8&PID_41DB
%CompositeAdbInterface% = USB_Install, USB\VID_22B8&PID_41DB&MI_01
;
;Google NexusOne
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E11
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E12&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E22&MI_01
; Archos Gen7
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1361
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1361&MI_01
; Archos HT
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1401
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1401&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1407
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1407&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1409
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1409&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_140B
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_140B&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_140E
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_140E&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1431
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1431&MI_01
;Archos Gen8
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1411
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1411&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1569
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1569&MI_01
;Archos Gen9
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1501
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1502&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1504&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1506&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1507&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1509&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_150A&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1511
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1512&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1514&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1516&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1517&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1519&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_151A&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1521
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1522&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1524&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1526&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1527&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1529&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_152A&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1531
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1532&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1534&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1536&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1537&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1539&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_153A&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1541
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1542&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1544&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1546&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1547&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1549&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_154A&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_1551
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1552&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1554&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1556&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1557&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_1559&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_155A&MI_01
[USB_Install]
Include = winusb.inf
Needs = WINUSB.NT
[USB_Install.Services]
Include = winusb.inf
AddService = WinUSB,0x00000002,WinUSB_ServiceInstall
[WinUSB_ServiceInstall]
DisplayName = %WinUSB_SvcDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WinUSB.sys
[USB_Install.Wdf]
KmdfService = WINUSB, WinUSB_Install
[WinUSB_Install]
KmdfLibraryVersion = 1.9
[USB_Install.HW]
AddReg = Dev_AddReg
[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{F72FE0D4-CBCB-407d-8814-9ED673D0DD6B}"
[USB_Install.CoInstallers]
AddReg = CoInstallers_AddReg
CopyFiles = CoInstallers_CopyFiles
[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01009.dll,WdfCoInstaller","WinUSBCoInstaller2.dll"
[CoInstallers_CopyFiles]
WinUSBCoInstaller2.dll
WdfCoInstaller01009.dll
[DestinationDirs]
CoInstallers_CopyFiles=11
[SourceDisksNames]
1 = %DISK_NAME%,,,\i386
2 = %DISK_NAME%,,,\amd64
[SourceDisksFiles.x86]
WinUSBCoInstaller2.dll = 1
WdfCoInstaller01009.dll = 1
[SourceDisksFiles.amd64]
WinUSBCoInstaller2.dll = 2
WdfCoInstaller01009.dll = 2
[Strings]
ProviderName = "Google, Inc."
SingleAdbInterface = "Android ADB Interface"
CompositeAdbInterface = "Android Composite ADB Interface"
SingleBootLoaderInterface = "Android Bootloader Interface"
WinUSB_SvcDesc = "Android USB Driver"
DISK_NAME = "Android WinUsb installation disk"
ClassName = "Android Phone"
Nice to get new guide to do this but i just cant get this work Step 10 just wont work. I have installed sdk manager and allmost everything from it etc. I will try now to reboot my computer and uninstall everything about android if this wont work and try again.
Shano56 said:
this is the inf
Click to expand...
Click to collapse
Looks good
Matenlee said:
Nice to get new guide to do this but i just cant get this work Step 10 just wont work. I have installed sdk manager and allmost everything from it etc. I will try now to reboot my computer and uninstall everything about android if this wont work and try again.
Click to expand...
Click to collapse
Did you add path to adb location to environment variables?
Shano56, it would be good to add explicit instructions about this (for both linux and windoze). I know it's stated in SDK docs but...
gen_scheisskopf said:
Looks good
Did you add path to adb location to environment variables?
Click to expand...
Click to collapse
Now i have situation that i have Archos 80 G9 with 4.0.5 (newest official firmware) and windows 7 pc with no installed programs etc. installed for android. Now im going to just follow the guide and install the driver.
If i need to do something else too why won´t it read in guide?
Would be nice to get this work so i can go to step 2 because i would like to root the device.
Matenlee said:
If i need to do something else too why won´t it read in guide?
Would be nice to get this work so i can go to step 2 because i would like to root the device.
Click to expand...
Click to collapse
Because how to get adb working "everywhere" in system is written in SDK docs.
RTFM people.
gen_scheisskopf said:
Because how to get adb working "everywhere" in system is written in SDK docs.
RTFM people.
Click to expand...
Click to collapse
Would be easyer to say this clear because there can be more first time android users than me
Now i have driver installed but going to download that android sdk and istall it because now it says cant find path at step 10
EDIT: downloaded Android SDK manager and put it install those 9 things it wanted to. So what next? Do i need to install something from that software or install something else to get this work?
Shano56 i will go trought all these guides and will give the feedback how to make this so easy that my kind of idiots will survive this.
EDIT1: When i try to do Step1 and copy that first line to cmd it says nothing. When i copy second and third it says "The command is not recognized as an internal or external command,
program or batch file." (not sure is that but you sure know what i mean. I have diffirent language and just used google translator. Still stuck at the same point :/ Would be super nice to get this work today because im receiving memory card tomorrow and would like to use my device.
EDIT2: GOT IT WORK! http://forum.xda-developers.com/showthread.php?t=1413293&page=3 had to follow those rules. I moved the android file folder to C:\ from the program files where it usually put it. Had to copy the folder from android folder to get it like that guys guide and other guy questions.
@Gen i was planning on tut for system path next thanks for reminding me though, i'll get to it asap
Matenlee said:
Shano56 i will go trought all these guides and will give the feedback how to make this so easy that my kind of idiots will survive this.
EDIT1: When i try to do Step1 and copy that first line to cmd it says nothing. When i copy second and third it says "The command is not recognized as an internal or external command,
program or batch file." (not sure is that but you sure know what i mean. I have diffirent language and just used google translator. Still stuck at the same point :/ Would be super nice to get this work today because im receiving memory card tomorrow and would like to use my device.
EDIT2: GOT IT WORK! http://forum.xda-developers.com/showthread.php?t=1413293&page=3 had to follow those rules. I moved the android file folder to C:\ from the program files where it usually put it. Had to copy the folder from android folder to get it like that guys guide and other guy questions.
Click to expand...
Click to collapse
thank you! and the reason you get it to work when you put it in c:\ is because it's not in the system path yet. i'm going to write up a tutorial in a bit for that

[Q][KFHD7]Can't mount /data

Alright, So I'll admit I messed up the whole process and I'm basically trying to unbrick it at this point. I installed TWRP 2.4.4.0 on my KFHD 7" wiped everything then realized I never pushed the fioles to flash onto the KF before I did this. After messing around with my adb drivers for a while (I had to spoof them and add values to the android_usb.inf for it to even show up now) I can use adb while in TWRP and it shows my device as "recovery" I was able to push files to it earlier, but now I can't mount "/data" which is where I pushed those files earlier. I do have a stock-boot.img a stock-recovery.img and a stock-system.img (Or at least I hope, Idk if it got wiped) I'm not all to familiar with adb or fastboot commands to know what I can do to get anything back or at least get /data back.
If any of y'all could help me out, that'd be great, otherwise I now have a really expensive paper-weight.
1 more thing. I don't have ADB when I'm in fastboot. It shows up as an "Android composite ADB interface" in Device manager, but when I run adb (even after restarts) it never shows up in adb devices. Once again I had to spoof that driver because it was showing up as "Unknown Device' (I checked hardware ID's and it was the kindle 0x1949 that I installed the drivers for)
KFFA Isn't seeming to work, I've tried there drivers as well, no dice while the Kindle is in TWRP or in Fastboot.
I have the SDK and my own custom ADB Drivers installed, If you want me to post the .inf here for reference, I can.
EDIT: Okay, I've really screwed up, i flashed the stock boot, now all I get is a orange kindle fire logo. and so far IDK how to get into recovery. The logo doesn't animate at all, I'm guessing I have no OS installed, I think I just bricked it for good, unless I can get into a fastboot. HELP!!!
Android_usb.inf
These are reflected in both NTx86 and NTamd64
Code:
;Kindle Fire #These are the HW ID's for Amazon Kindle Fire OS
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0006
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0006&MI_01
;Kindle Fire #These are the HW ID's for Fastboot
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0007
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0007&REV_0100
;Kindle Fire HD 7 #These are the HW ID's for TWRP
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_D001
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_D001&REV_0216

[Q] How to create an image from a stock KDZ file for nvflashing

Good day to all dev and to the community,
first of, i know this is not the right thread to post but im kinda desperate now.
i purchase a phone which is optimus ex su880 (nearest family is su660)
i tried updating using the LG updater but unfortunately i bricked my phone.
right now, i can no longer boot to S/w / normal mode and my only solution is to flash it via NVflash.
but my problem is, because of the lack of support for this phone. i cant find any image or .bat file to re install the ICS rom back.
now, my question is if we can create a .bat file/image from a Stock KDZ rom?
i can boot to APX but i have no firmware to flash.
your exeperties is highly appreciated.
i already spent 3 days looking for an answer but to no avail...hope you can enlighten me.
Hi alamatnitotoy,
seems that you have to deal with Tegra 250 AP20H a.k.a. Ventana.
In the first place, have you managed to read your partition table?
Can you send me link where I can download the rom for your phone?
Edit: I managed to download v10m kdz. I am flashing to my p990. Hopefuly i could get the necessary files this way to make you an nvflash rom
Edit2: Download my attachment, please. Extract the rar, then run flash.bat. It should flash the bootloader to your phone after that you can put your phone into S/W download mode to flash any original rom.
I hope it is going to work.
thanks
thank you very much sir.. you save my day...
Click, click, click....
How to create, or, can you create it for me?
tryin said:
Click, click, click....
How to create, or, can you create it for me?
Click to expand...
Click to collapse
If you have su880 it will work for you as well, but if your partition layout got damaged it won't.
When I get home I will make a tutorial how to obtain bootloader.
bitdomo said:
If you have su880 it will work for you as well, but if your partition layout got damaged it won't.
When I get home I will make a tutorial how to obtain bootloader.
Click to expand...
Click to collapse
No no sorry, I have been misunderstood, I wanted to say that this posts don't explain how to create an nvflash image from a stock KDZ file, but only have the solution handed on a plate, or better, in an archive , which is not very educational I think...
But if all goes well for alamatnitotoy....
Thanks anyway for your thought, don't worry...
Well, let the tutorial begin!
Download a kdz rom. In my case I downloaded v10m
Download AIO-toolkit for p990
Start AIO-toolkit select option number 5, then select option number 1. Drag and drop the kdz file to the AIO-toolkit window and hit enter. It will convert the kdz file into smartflash format. When the process finished (the smartflash files are in the root directory of the AIO-toolkit in the v10m folder), you can choose to extract the smartflash file. Choose yes. Then select option number 2. On the next screen select option A or E, it does not matter which you choose because the partitions are in a different order in a su880 smartflash file. So, you have to figure out which partition is which after the extraction. I choosed option A. The extracted files will be in the root directory of AIO-toolkit in the extracted_files folder.
Compare the extracted files with any other bootloader file from p990 or su660 to find out which file is the bootloader, but hopefully the file named bootloader.img is truly the bootlader.
SU880 is the brother phone of P990 and SU660, therefore I suggested that the bootloader partition for SU880 is the 4th partition just like for SU660 and P990
Open bootloader.img in hex editor, delete the bunch of FF hex values from the end of the file then save it.
Now you have to download nvflash and copy the bootloader.img to the nvflash folder.
Create a flash.bat file. fill it with this content:
Code:
nvflash.exe --bl bootloader.img --download 4 bootloader.img
Connet your phone in nvflash mode
Double click on flash.bat and hope the best
After the flashing is done restart your phone to S/W download mode and smartflash the previously converted rom to smarthflash format
Now you have a working su880 with a bootloader which you can use with nvflash
To create an nvflash rom, you need the following files:
bootloader (we have it already)
partition table configuration file
bct file (Binary Configuration Table)
system.img
boot.img (kernel)
recovery.img
Obtaining partition table:
Connect phone in nvflash mode and run nvflash with the following command:
Code:
nvflash.exe --bl bootloader.img --getpartitiontable su880_pt_table.txt
Now you have to convert it by hand to a partition config file. Use su660 or p990 config files as a sample to create it for su880.
Rename the file to partition.cfg
The rest of the files:
You have 2 ways to get the rest of the files by figuring out which extraded files are which files, or use nvflash.
If you choose nvflash then you can read back the partitions from your phone to your computer by this command:
Code:
nvflash.exe --bl bootloader.img --read N FILENAME
N is for the number of the partition and FILENAME is for the name of the file you want to save. After the firt partition read use this command to save the rest of the partitions
Code:
nvflash.exe -r --download N FILENAME
Check the partition config file for which partition has which number.
Name of the partition you need:
APP: system.img
LNX: boot.img (kernel)
SOS: recovery.img
When you read back all partition on the list above (or figured whcih extracted partition file is which partition) then you have to obtain the bct file.
Obtaining bct file:
Run nvflash with this command:
Code:
nvflash.exe --bct su880.bct --getbct --bl bootloader.img
After the command got execudet you will have the btc file on your computer.
Now you have everything. Just one thing left.
Create a flash.bat file and fill it with this content:
Code:
nvflash.exe --bct su880.bct --setbct --odmdata 0xC8000 --configfile partition.cfg --create --bl bootloader.img --go
I haven't tested it yet, because I don't have su880 phone. The only thing which bothers is that I am not 100% sure that my partition config file is correct. I am uploading my work, maybe you can test, but there is a high chance it will brick your phone. I beleive you can still smartflash any rom if you try it and it bricks your phone. I tried it on my p990 just for testing every script is written correctly and I don't made a typo. So it flashed correctly, but since my phone is not a su880 I can not tell is it going to work.
Finally my work is uploaded. Download here
Very good work bitdomo!
Sure very instructive!
Only one question, what's the meaning of
Code:
--odmdata 0xC8000
? Why that address?
tryin said:
Very good work bitdomo!
Sure very instructive!
Only one question, what's the meaning of
Code:
--odmdata 0xC8000
? Why that address?
Click to expand...
Click to collapse
Actually I don't know what is that, I would love to know it as well. This addres is there in every nvflash rom for su660 and p990. To get this information you have to extract the bct file.
The program which extract bct file is here. You have to compile it on linux. At the end of this read me there is an example how to use this program.
Performing that command for su880.btc will lead you to a file like this:
Code:
Version = 0x00020001;
BlockSize = 0x00004000;
PageSize = 0x00000200;
PartitionSize = 0x01000000;
OdmData = 0x000c8000;
# Bootloader used = 1;
# Bootloaders max = 4;
# BCT size = 4080;
# Hash size = 16;
# Crypto offset = 16;
# Crypto length = 4064;
# Max BCT search blocks = 64;
#
# These values are set by cbootimage using the
# bootloader provided by the Bootloader=...
# configuration option.
#
# Bootloader[0].Version = 0x00000001;
# Bootloader[0].Start block = 384;
# Bootloader[0].Start page = 0;
# Bootloader[0].Length = 923444;
# Bootloader[0].Load address = 0x00108000;
# Bootloader[0].Entry point = 0x00108000;
# Bootloader[0].Attributes = 0x00000004;
SDRAM[0].MemoryType = NvBootMemoryType_LpDdr2;
SDRAM[0].PllMChargePumpSetupControl = 0x00000008;
SDRAM[0].PllMLoopFilterSetupControl = 0x00000000;
SDRAM[0].PllMInputDivider = 0x0000000c;
SDRAM[0].PllMFeedbackDivider = 0x000002f8;
SDRAM[0].PllMPostDivider = 0x00000000;
SDRAM[0].PllMStableTime = 0x0000012c;
SDRAM[0].EmcClockDivider = 0x00000001;
SDRAM[0].EmcAutoCalInterval = 0x00000000;
SDRAM[0].EmcAutoCalConfig = 0xe0a61111;
SDRAM[0].EmcAutoCalWait = 0x00000000;
SDRAM[0].EmcPinProgramWait = 0x00000000;
SDRAM[0].EmcRc = 0x00000017;
SDRAM[0].EmcRfc = 0x00000032;
SDRAM[0].EmcRas = 0x00000010;
SDRAM[0].EmcRp = 0x00000007;
SDRAM[0].EmcR2w = 0x00000008;
SDRAM[0].EmcW2r = 0x00000005;
SDRAM[0].EmcR2p = 0x00000003;
SDRAM[0].EmcW2p = 0x0000000b;
SDRAM[0].EmcRrd = 0x00000004;
SDRAM[0].EmcRdRcd = 0x00000007;
SDRAM[0].EmcWrRcd = 0x00000007;
SDRAM[0].EmcRext = 0x00000003;
SDRAM[0].EmcWdv = 0x00000003;
SDRAM[0].EmcQUseExtra = 0x00000006;
SDRAM[0].EmcQUse = 0x00000007;
SDRAM[0].EmcQRst = 0x00000004;
SDRAM[0].EmcQSafe = 0x0000000a;
SDRAM[0].EmcRdv = 0x0000000e;
SDRAM[0].EmcRefresh = 0x0000059f;
SDRAM[0].EmcBurstRefreshNum = 0x00000000;
SDRAM[0].EmcPdEx2Wr = 0x00000004;
SDRAM[0].EmcPdEx2Rd = 0x00000004;
SDRAM[0].EmcPChg2Pden = 0x00000007;
SDRAM[0].EmcAct2Pden = 0x00000008;
SDRAM[0].EmcAr2Pden = 0x00000001;
SDRAM[0].EmcRw2Pden = 0x00000011;
SDRAM[0].EmcTxsr = 0x00000036;
SDRAM[0].EmcTcke = 0x00000003;
SDRAM[0].EmcTfaw = 0x00000013;
SDRAM[0].EmcTrpab = 0x00000008;
SDRAM[0].EmcTClkStable = 0x00000007;
SDRAM[0].EmcTClkStop = 0x00000002;
SDRAM[0].EmcTRefBw = 0x0000062d;
SDRAM[0].EmcFbioCfg1 = 0x00000000;
SDRAM[0].EmcFbioDqsibDlyMsb = 0x00000000;
SDRAM[0].EmcFbioDqsibDly = 0x2c2c2c2c;
SDRAM[0].EmcFbioQuseDlyMsb = 0x00000000;
SDRAM[0].EmcFbioQuseDly = 0x14141414;
SDRAM[0].EmcFbioCfg5 = 0x00000282;
SDRAM[0].EmcFbioCfg6 = 0x00000003;
SDRAM[0].EmcFbioSpare = 0x00000000;
SDRAM[0].EmcMrsResetDllWait = 0x00000000;
SDRAM[0].EmcMrsResetDll = 0x00000000;
SDRAM[0].EmcMrsDdr2DllReset = 0x00000000;
SDRAM[0].EmcMrs = 0x00000000;
SDRAM[0].EmcEmrsEmr2 = 0x00000000;
SDRAM[0].EmcEmrsEmr3 = 0x00000000;
SDRAM[0].EmcEmrsDdr2DllEnable = 0x00000000;
SDRAM[0].EmcEmrsDdr2OcdCalib = 0x00000000;
SDRAM[0].EmcEmrs = 0x00000000;
SDRAM[0].EmcMrw1 = 0x0001008a;
SDRAM[0].EmcMrw2 = 0x00020004;
SDRAM[0].EmcMrw3 = 0x00030002;
SDRAM[0].EmcMrwResetCommand = 0x003f0000;
SDRAM[0].EmcMrwResetNInitWait = 0x0000000a;
SDRAM[0].EmcAdrCfg1 = 0x00070303;
SDRAM[0].EmcAdrCfg = 0x01070303;
SDRAM[0].McEmemCfg = 0x00100000;
SDRAM[0].McLowLatencyConfig = 0x80000003;
SDRAM[0].EmcCfg2 = 0x00000403;
SDRAM[0].EmcCfgDigDll = 0xf0000413;
SDRAM[0].EmcCfgClktrim0 = 0x00000000;
SDRAM[0].EmcCfgClktrim1 = 0x00000000;
SDRAM[0].EmcCfgClktrim2 = 0x00000000;
SDRAM[0].EmcCfg = 0x0001ff00;
SDRAM[0].EmcDbg = 0x01000020;
SDRAM[0].AhbArbitrationXbarCtrl = 0x00010000;
SDRAM[0].EmcDllXformDqs = 0x00000010;
SDRAM[0].EmcDllXformQUse = 0x00000008;
SDRAM[0].WarmBootWait = 0x00000001;
SDRAM[0].EmcCttTermCtrl = 0x00000802;
SDRAM[0].EmcOdtWrite = 0x00000000;
SDRAM[0].EmcOdtRead = 0x00000000;
SDRAM[0].EmcZcalRefCnt = 0x00000000;
SDRAM[0].EmcZcalWaitCnt = 0x00000023;
SDRAM[0].EmcZcalMrwCmd = 0x000a0056;
SDRAM[0].EmcMrwZqInitDev0 = 0x800a00ff;
SDRAM[0].EmcMrwZqInitDev1 = 0x400a00ff;
SDRAM[0].EmcMrwZqInitWait = 0x00000001;
SDRAM[0].EmcDdr2Wait = 0x00000000;
SDRAM[0].PmcDdrPwr = 0x00000000;
SDRAM[0].ApbMiscGpXm2CfgAPadCtrl = 0x77ffc000;
SDRAM[0].ApbMiscGpXm2CfgCPadCtrl2 = 0x08080040;
SDRAM[0].ApbMiscGpXm2CfgCPadCtrl = 0x77fffff8;
SDRAM[0].ApbMiscGpXm2CfgDPadCtrl2 = 0x00000000;
SDRAM[0].ApbMiscGpXm2CfgDPadCtrl = 0x77fffff8;
SDRAM[0].ApbMiscGpXm2ClkCfgPadCtrl = 0x77ffc000;
SDRAM[0].ApbMiscGpXm2CompPadCtrl = 0x01f1f008;
SDRAM[0].ApbMiscGpXm2VttGenPadCtrl = 0x00005500;
For p990:
Code:
Version = 0x00020001;
BlockSize = 0x00004000;
PageSize = 0x00000200;
PartitionSize = 0x01000000;
OdmData = 0x000c8000;
# Bootloader used = 0;
# Bootloaders max = 4;
# BCT size = 4080;
# Hash size = 16;
# Crypto offset = 16;
# Crypto length = 4064;
# Max BCT search blocks = 64;
DevType[0] = NvBootDevType_Sdmmc;
DeviceParam[0].SdmmcParams.ClockDivider = 0x0000000c;
DeviceParam[0].SdmmcParams.DataWidth = NvBootSdmmcDataWidth_8Bit;
DeviceParam[0].SdmmcParams.MaxPowerClassSupported = 0x00000000;
DevType[1] = NvBootDevType_Sdmmc;
DeviceParam[1].SdmmcParams.ClockDivider = 0x0000000c;
DeviceParam[1].SdmmcParams.DataWidth = NvBootSdmmcDataWidth_8Bit;
DeviceParam[1].SdmmcParams.MaxPowerClassSupported = 0x00000000;
DevType[2] = NvBootDevType_Sdmmc;
DeviceParam[2].SdmmcParams.ClockDivider = 0x0000000c;
DeviceParam[2].SdmmcParams.DataWidth = NvBootSdmmcDataWidth_8Bit;
DeviceParam[2].SdmmcParams.MaxPowerClassSupported = 0x00000000;
DevType[3] = NvBootDevType_Sdmmc;
DeviceParam[3].SdmmcParams.ClockDivider = 0x0000000c;
DeviceParam[3].SdmmcParams.DataWidth = NvBootSdmmcDataWidth_8Bit;
DeviceParam[3].SdmmcParams.MaxPowerClassSupported = 0x00000000;
SDRAM[0].MemoryType = NvBootMemoryType_LpDdr2;
SDRAM[0].PllMChargePumpSetupControl = 0x00000008;
SDRAM[0].PllMLoopFilterSetupControl = 0x00000000;
SDRAM[0].PllMInputDivider = 0x0000000c;
SDRAM[0].PllMFeedbackDivider = 0x00000258;
SDRAM[0].PllMPostDivider = 0x00000000;
SDRAM[0].PllMStableTime = 0x0000012c;
SDRAM[0].EmcClockDivider = 0x00000001;
SDRAM[0].EmcAutoCalInterval = 0x00000000;
SDRAM[0].EmcAutoCalConfig = 0xe0a61111;
SDRAM[0].EmcAutoCalWait = 0x00000000;
SDRAM[0].EmcPinProgramWait = 0x00000000;
SDRAM[0].EmcRc = 0x00000012;
SDRAM[0].EmcRfc = 0x00000027;
SDRAM[0].EmcRas = 0x0000000d;
SDRAM[0].EmcRp = 0x00000006;
SDRAM[0].EmcR2w = 0x00000007;
SDRAM[0].EmcW2r = 0x00000005;
SDRAM[0].EmcR2p = 0x00000003;
SDRAM[0].EmcW2p = 0x0000000b;
SDRAM[0].EmcRrd = 0x00000003;
SDRAM[0].EmcRdRcd = 0x00000006;
SDRAM[0].EmcWrRcd = 0x00000006;
SDRAM[0].EmcRext = 0x00000003;
SDRAM[0].EmcWdv = 0x00000003;
SDRAM[0].EmcQUseExtra = 0x00000006;
SDRAM[0].EmcQUse = 0x00000007;
SDRAM[0].EmcQRst = 0x00000004;
SDRAM[0].EmcQSafe = 0x00000009;
SDRAM[0].EmcRdv = 0x0000000d;
SDRAM[0].EmcRefresh = 0x0000045f;
SDRAM[0].EmcBurstRefreshNum = 0x00000000;
SDRAM[0].EmcPdEx2Wr = 0x00000004;
SDRAM[0].EmcPdEx2Rd = 0x00000004;
SDRAM[0].EmcPChg2Pden = 0x00000006;
SDRAM[0].EmcAct2Pden = 0x00000008;
SDRAM[0].EmcAr2Pden = 0x00000001;
SDRAM[0].EmcRw2Pden = 0x0000000f;
SDRAM[0].EmcTxsr = 0x0000002a;
SDRAM[0].EmcTcke = 0x00000003;
SDRAM[0].EmcTfaw = 0x0000000f;
SDRAM[0].EmcTrpab = 0x00000007;
SDRAM[0].EmcTClkStable = 0x00000007;
SDRAM[0].EmcTClkStop = 0x00000002;
SDRAM[0].EmcTRefBw = 0x000004e0;
SDRAM[0].EmcFbioCfg1 = 0x00000000;
SDRAM[0].EmcFbioDqsibDlyMsb = 0x00000000;
SDRAM[0].EmcFbioDqsibDly = 0x34343434;
SDRAM[0].EmcFbioQuseDlyMsb = 0x00000000;
SDRAM[0].EmcFbioQuseDly = 0x00000000;
SDRAM[0].EmcFbioCfg5 = 0x00000282;
SDRAM[0].EmcFbioCfg6 = 0x00000002;
SDRAM[0].EmcFbioSpare = 0x00000000;
SDRAM[0].EmcMrsResetDllWait = 0x00000000;
SDRAM[0].EmcMrsResetDll = 0x00000000;
SDRAM[0].EmcMrsDdr2DllReset = 0x00000000;
SDRAM[0].EmcMrs = 0x00000000;
SDRAM[0].EmcEmrsEmr2 = 0x00000000;
SDRAM[0].EmcEmrsEmr3 = 0x00000000;
SDRAM[0].EmcEmrsDdr2DllEnable = 0x00000000;
SDRAM[0].EmcEmrsDdr2OcdCalib = 0x00000000;
SDRAM[0].EmcEmrs = 0x00000000;
SDRAM[0].EmcMrw1 = 0x0001008a;
SDRAM[0].EmcMrw2 = 0x00020004;
SDRAM[0].EmcMrw3 = 0x00030002;
SDRAM[0].EmcMrwResetCommand = 0x003f0000;
SDRAM[0].EmcMrwResetNInitWait = 0x0000000a;
SDRAM[0].EmcAdrCfg1 = 0x00060302;
SDRAM[0].EmcAdrCfg = 0x01060302;
SDRAM[0].McEmemCfg = 0x00080000;
SDRAM[0].McLowLatencyConfig = 0x80000003;
SDRAM[0].EmcCfg2 = 0x00000403;
SDRAM[0].EmcCfgDigDll = 0xe0000413;
SDRAM[0].EmcCfgClktrim0 = 0x00000000;
SDRAM[0].EmcCfgClktrim1 = 0x00000000;
SDRAM[0].EmcCfgClktrim2 = 0x00000000;
SDRAM[0].EmcCfg = 0x0001ff00;
SDRAM[0].EmcDbg = 0x01000020;
SDRAM[0].AhbArbitrationXbarCtrl = 0x00010000;
SDRAM[0].EmcDllXformDqs = 0x00000010;
SDRAM[0].EmcDllXformQUse = 0x00000008;
SDRAM[0].WarmBootWait = 0x00000001;
SDRAM[0].EmcCttTermCtrl = 0x00000802;
SDRAM[0].EmcOdtWrite = 0x00000000;
SDRAM[0].EmcOdtRead = 0x00000000;
SDRAM[0].EmcZcalRefCnt = 0x00000000;
SDRAM[0].EmcZcalWaitCnt = 0x0000001b;
SDRAM[0].EmcZcalMrwCmd = 0x000a0056;
SDRAM[0].EmcMrwZqInitDev0 = 0x800a00ff;
SDRAM[0].EmcMrwZqInitDev1 = 0x400a00ff;
SDRAM[0].EmcMrwZqInitWait = 0x00000001;
SDRAM[0].EmcDdr2Wait = 0x00000000;
SDRAM[0].PmcDdrPwr = 0x00000000;
SDRAM[0].ApbMiscGpXm2CfgAPadCtrl = 0x77ffc000;
SDRAM[0].ApbMiscGpXm2CfgCPadCtrl2 = 0x08080040;
SDRAM[0].ApbMiscGpXm2CfgCPadCtrl = 0x77fffff8;
SDRAM[0].ApbMiscGpXm2CfgDPadCtrl2 = 0x00000000;
SDRAM[0].ApbMiscGpXm2CfgDPadCtrl = 0x77fffff8;
SDRAM[0].ApbMiscGpXm2ClkCfgPadCtrl = 0x77ffc000;
SDRAM[0].ApbMiscGpXm2CompPadCtrl = 0x01f1f008;
SDRAM[0].ApbMiscGpXm2VttGenPadCtrl = 0x00005500;
If you check the begining of the su880.bct config you can see the odmdata is the same as in the p990.bct config.
That is why I put that --odmdata 0xc8000.
I downloaded bct_dump some time ago, from here, but this is my BCT file:
Version = 0x00020001;
BlockSize = 0x00004000;
PageSize = 0x00000200;
PartitionSize = 0x01000000;
# Bootloader used = 1;
# Bootloaders max = 4;
# BCT size = 4080;
# Hash size = 16;
# Crypto offset = 16;
# Crypto length = 4064;
# Max BCT search blocks = 64;
#
# These values are set by cbootimage using the
# bootloader provided by the Bootloader=...
# configuration option.
#
# Bootloader[0].Version = 0x00000001;
# Bootloader[0].Start block = 288;
# Bootloader[0].Start page = 0;
# Bootloader[0].Length = 891020;
# Bootloader[0].Load address = 0x00108000;
# Bootloader[0].Entry point = 0x00108000;
# Bootloader[0].Attributes = 0x00000004;
DevType[0] = NvBootDevType_Sdmmc;
DeviceParam[0].SdmmcParams.ClockDivider = 0x0000000c;
DeviceParam[0].SdmmcParams.DataWidth = NvBootSdmmcDataWidth_8Bit;
DeviceParam[0].SdmmcParams.MaxPowerClassSupported = 0x00000000;
DevType[1] = NvBootDevType_Sdmmc;
DeviceParam[1].SdmmcParams.ClockDivider = 0x0000000c;
DeviceParam[1].SdmmcParams.DataWidth = NvBootSdmmcDataWidth_8Bit;
DeviceParam[1].SdmmcParams.MaxPowerClassSupported = 0x00000000;
DevType[2] = NvBootDevType_Sdmmc;
DeviceParam[2].SdmmcParams.ClockDivider = 0x0000000c;
DeviceParam[2].SdmmcParams.DataWidth = NvBootSdmmcDataWidth_8Bit;
DeviceParam[2].SdmmcParams.MaxPowerClassSupported = 0x00000000;
DevType[3] = NvBootDevType_Sdmmc;
DeviceParam[3].SdmmcParams.ClockDivider = 0x0000000c;
DeviceParam[3].SdmmcParams.DataWidth = NvBootSdmmcDataWidth_8Bit;
DeviceParam[3].SdmmcParams.MaxPowerClassSupported = 0x00000000;
SDRAM[0].MemoryType = NvBootMemoryType_LpDdr2;
SDRAM[0].PllMChargePumpSetupControl = 0x00000008;
SDRAM[0].PllMLoopFilterSetupControl = 0x00000000;
SDRAM[0].PllMInputDivider = 0x0000000c;
SDRAM[0].PllMFeedbackDivider = 0x00000258;
SDRAM[0].PllMPostDivider = 0x00000000;
SDRAM[0].PllMStableTime = 0x0000012c;
SDRAM[0].EmcClockDivider = 0x00000001;
SDRAM[0].EmcAutoCalInterval = 0x00000000;
SDRAM[0].EmcAutoCalConfig = 0xe0a61111;
SDRAM[0].EmcAutoCalWait = 0x00000000;
SDRAM[0].EmcPinProgramWait = 0x00000000;
SDRAM[0].EmcRc = 0x00000012;
SDRAM[0].EmcRfc = 0x00000027;
SDRAM[0].EmcRas = 0x0000000d;
SDRAM[0].EmcRp = 0x00000006;
SDRAM[0].EmcR2w = 0x00000007;
SDRAM[0].EmcW2r = 0x00000005;
SDRAM[0].EmcR2p = 0x00000003;
SDRAM[0].EmcW2p = 0x0000000b;
SDRAM[0].EmcRrd = 0x00000003;
SDRAM[0].EmcRdRcd = 0x00000006;
SDRAM[0].EmcWrRcd = 0x00000006;
SDRAM[0].EmcRext = 0x00000003;
SDRAM[0].EmcWdv = 0x00000003;
SDRAM[0].EmcQUseExtra = 0x00000006;
SDRAM[0].EmcQUse = 0x00000007;
SDRAM[0].EmcQRst = 0x00000004;
SDRAM[0].EmcQSafe = 0x00000009;
SDRAM[0].EmcRdv = 0x0000000d;
SDRAM[0].EmcRefresh = 0x0000045f;
SDRAM[0].EmcBurstRefreshNum = 0x00000000;
SDRAM[0].EmcPdEx2Wr = 0x00000004;
SDRAM[0].EmcPdEx2Rd = 0x00000004;
SDRAM[0].EmcPChg2Pden = 0x00000006;
SDRAM[0].EmcAct2Pden = 0x00000008;
SDRAM[0].EmcAr2Pden = 0x00000001;
SDRAM[0].EmcRw2Pden = 0x0000000f;
SDRAM[0].EmcTxsr = 0x0000002a;
SDRAM[0].EmcTcke = 0x00000003;
SDRAM[0].EmcTfaw = 0x0000000f;
SDRAM[0].EmcTrpab = 0x00000007;
SDRAM[0].EmcTClkStable = 0x00000007;
SDRAM[0].EmcTClkStop = 0x00000002;
SDRAM[0].EmcTRefBw = 0x000004e0;
SDRAM[0].EmcFbioCfg1 = 0x00000000;
SDRAM[0].EmcFbioDqsibDlyMsb = 0x00000000;
SDRAM[0].EmcFbioDqsibDly = 0x34343434;
SDRAM[0].EmcFbioQuseDlyMsb = 0x00000000;
SDRAM[0].EmcFbioQuseDly = 0x00000000;
SDRAM[0].EmcFbioCfg5 = 0x00000282;
SDRAM[0].EmcFbioCfg6 = 0x00000002;
SDRAM[0].EmcFbioSpare = 0x00000000;
SDRAM[0].EmcMrsResetDllWait = 0x00000000;
SDRAM[0].EmcMrsResetDll = 0x00000000;
SDRAM[0].EmcMrsDdr2DllReset = 0x00000000;
SDRAM[0].EmcMrs = 0x00000000;
SDRAM[0].EmcEmrsEmr2 = 0x00000000;
SDRAM[0].EmcEmrsEmr3 = 0x00000000;
SDRAM[0].EmcEmrsDdr2DllEnable = 0x00000000;
SDRAM[0].EmcEmrsDdr2OcdCalib = 0x00000000;
SDRAM[0].EmcEmrs = 0x00000000;
SDRAM[0].EmcMrw1 = 0x0001008a;
SDRAM[0].EmcMrw2 = 0x00020004;
SDRAM[0].EmcMrw3 = 0x00030002;
SDRAM[0].EmcMrwResetCommand = 0x003f0000;
SDRAM[0].EmcMrwResetNInitWait = 0x0000000a;
SDRAM[0].EmcAdrCfg1 = 0x00060302;
SDRAM[0].EmcAdrCfg = 0x01060302;
SDRAM[0].McEmemCfg = 0x00080000;
SDRAM[0].McLowLatencyConfig = 0x80000003;
SDRAM[0].EmcCfg2 = 0x00000403;
SDRAM[0].EmcCfgDigDll = 0xe0000413;
SDRAM[0].EmcCfgClktrim0 = 0x00000000;
SDRAM[0].EmcCfgClktrim1 = 0x00000000;
SDRAM[0].EmcCfgClktrim2 = 0x00000000;
SDRAM[0].EmcCfg = 0x0001ff00;
SDRAM[0].EmcDbg = 0x01000020;
SDRAM[0].AhbArbitrationXbarCtrl = 0x00010000;
SDRAM[0].EmcDllXformDqs = 0x00000010;
SDRAM[0].EmcDllXformQUse = 0x00000008;
SDRAM[0].WarmBootWait = 0x00000001;
SDRAM[0].EmcCttTermCtrl = 0x00000802;
SDRAM[0].EmcOdtWrite = 0x00000000;
SDRAM[0].EmcOdtRead = 0x00000000;
SDRAM[0].EmcZcalRefCnt = 0x00000000;
SDRAM[0].EmcZcalWaitCnt = 0x0000001b;
SDRAM[0].EmcZcalMrwCmd = 0x000a0056;
SDRAM[0].EmcMrwZqInitDev0 = 0x800a00ff;
SDRAM[0].EmcMrwZqInitDev1 = 0x400a00ff;
SDRAM[0].EmcMrwZqInitWait = 0x00000001;
SDRAM[0].EmcDdr2Wait = 0x00000000;
SDRAM[0].PmcDdrPwr = 0x00000000;
SDRAM[0].ApbMiscGpXm2CfgAPadCtrl = 0x77ffc000;
SDRAM[0].ApbMiscGpXm2CfgCPadCtrl2 = 0x08080040;
SDRAM[0].ApbMiscGpXm2CfgCPadCtrl = 0x77fffff8;
SDRAM[0].ApbMiscGpXm2CfgDPadCtrl2 = 0x00000000;
SDRAM[0].ApbMiscGpXm2CfgDPadCtrl = 0x77fffff8;
SDRAM[0].ApbMiscGpXm2ClkCfgPadCtrl = 0x77ffc000;
SDRAM[0].ApbMiscGpXm2CompPadCtrl = 0x01f1f008;
SDRAM[0].ApbMiscGpXm2VttGenPadCtrl = 0x00005500;
tryin said:
I downloaded bct_dump some time ago, from here, but this is my BCT file:
Version = 0x00020001;
BlockSize = 0x00004000;
PageSize = 0x00000200;
PartitionSize = 0x01000000;
# Bootloader used = 1;
# Bootloaders max = 4;
# BCT size = 4080;
# Hash size = 16;
# Crypto offset = 16;
# Crypto length = 4064;
# Max BCT search blocks = 64;
#
# These values are set by cbootimage using the
# bootloader provided by the Bootloader=...
# configuration option.
#
# Bootloader[0].Version = 0x00000001;
# Bootloader[0].Start block = 288;
# Bootloader[0].Start page = 0;
# Bootloader[0].Length = 891020;
# Bootloader[0].Load address = 0x00108000;
# Bootloader[0].Entry point = 0x00108000;
# Bootloader[0].Attributes = 0x00000004;
DevType[0] = NvBootDevType_Sdmmc;
DeviceParam[0].SdmmcParams.ClockDivider = 0x0000000c;
DeviceParam[0].SdmmcParams.DataWidth = NvBootSdmmcDataWidth_8Bit;
DeviceParam[0].SdmmcParams.MaxPowerClassSupported = 0x00000000;
DevType[1] = NvBootDevType_Sdmmc;
DeviceParam[1].SdmmcParams.ClockDivider = 0x0000000c;
DeviceParam[1].SdmmcParams.DataWidth = NvBootSdmmcDataWidth_8Bit;
DeviceParam[1].SdmmcParams.MaxPowerClassSupported = 0x00000000;
DevType[2] = NvBootDevType_Sdmmc;
DeviceParam[2].SdmmcParams.ClockDivider = 0x0000000c;
DeviceParam[2].SdmmcParams.DataWidth = NvBootSdmmcDataWidth_8Bit;
DeviceParam[2].SdmmcParams.MaxPowerClassSupported = 0x00000000;
DevType[3] = NvBootDevType_Sdmmc;
DeviceParam[3].SdmmcParams.ClockDivider = 0x0000000c;
DeviceParam[3].SdmmcParams.DataWidth = NvBootSdmmcDataWidth_8Bit;
DeviceParam[3].SdmmcParams.MaxPowerClassSupported = 0x00000000;
SDRAM[0].MemoryType = NvBootMemoryType_LpDdr2;
SDRAM[0].PllMChargePumpSetupControl = 0x00000008;
SDRAM[0].PllMLoopFilterSetupControl = 0x00000000;
SDRAM[0].PllMInputDivider = 0x0000000c;
SDRAM[0].PllMFeedbackDivider = 0x00000258;
SDRAM[0].PllMPostDivider = 0x00000000;
SDRAM[0].PllMStableTime = 0x0000012c;
SDRAM[0].EmcClockDivider = 0x00000001;
SDRAM[0].EmcAutoCalInterval = 0x00000000;
SDRAM[0].EmcAutoCalConfig = 0xe0a61111;
SDRAM[0].EmcAutoCalWait = 0x00000000;
SDRAM[0].EmcPinProgramWait = 0x00000000;
SDRAM[0].EmcRc = 0x00000012;
SDRAM[0].EmcRfc = 0x00000027;
SDRAM[0].EmcRas = 0x0000000d;
SDRAM[0].EmcRp = 0x00000006;
SDRAM[0].EmcR2w = 0x00000007;
SDRAM[0].EmcW2r = 0x00000005;
SDRAM[0].EmcR2p = 0x00000003;
SDRAM[0].EmcW2p = 0x0000000b;
SDRAM[0].EmcRrd = 0x00000003;
SDRAM[0].EmcRdRcd = 0x00000006;
SDRAM[0].EmcWrRcd = 0x00000006;
SDRAM[0].EmcRext = 0x00000003;
SDRAM[0].EmcWdv = 0x00000003;
SDRAM[0].EmcQUseExtra = 0x00000006;
SDRAM[0].EmcQUse = 0x00000007;
SDRAM[0].EmcQRst = 0x00000004;
SDRAM[0].EmcQSafe = 0x00000009;
SDRAM[0].EmcRdv = 0x0000000d;
SDRAM[0].EmcRefresh = 0x0000045f;
SDRAM[0].EmcBurstRefreshNum = 0x00000000;
SDRAM[0].EmcPdEx2Wr = 0x00000004;
SDRAM[0].EmcPdEx2Rd = 0x00000004;
SDRAM[0].EmcPChg2Pden = 0x00000006;
SDRAM[0].EmcAct2Pden = 0x00000008;
SDRAM[0].EmcAr2Pden = 0x00000001;
SDRAM[0].EmcRw2Pden = 0x0000000f;
SDRAM[0].EmcTxsr = 0x0000002a;
SDRAM[0].EmcTcke = 0x00000003;
SDRAM[0].EmcTfaw = 0x0000000f;
SDRAM[0].EmcTrpab = 0x00000007;
SDRAM[0].EmcTClkStable = 0x00000007;
SDRAM[0].EmcTClkStop = 0x00000002;
SDRAM[0].EmcTRefBw = 0x000004e0;
SDRAM[0].EmcFbioCfg1 = 0x00000000;
SDRAM[0].EmcFbioDqsibDlyMsb = 0x00000000;
SDRAM[0].EmcFbioDqsibDly = 0x34343434;
SDRAM[0].EmcFbioQuseDlyMsb = 0x00000000;
SDRAM[0].EmcFbioQuseDly = 0x00000000;
SDRAM[0].EmcFbioCfg5 = 0x00000282;
SDRAM[0].EmcFbioCfg6 = 0x00000002;
SDRAM[0].EmcFbioSpare = 0x00000000;
SDRAM[0].EmcMrsResetDllWait = 0x00000000;
SDRAM[0].EmcMrsResetDll = 0x00000000;
SDRAM[0].EmcMrsDdr2DllReset = 0x00000000;
SDRAM[0].EmcMrs = 0x00000000;
SDRAM[0].EmcEmrsEmr2 = 0x00000000;
SDRAM[0].EmcEmrsEmr3 = 0x00000000;
SDRAM[0].EmcEmrsDdr2DllEnable = 0x00000000;
SDRAM[0].EmcEmrsDdr2OcdCalib = 0x00000000;
SDRAM[0].EmcEmrs = 0x00000000;
SDRAM[0].EmcMrw1 = 0x0001008a;
SDRAM[0].EmcMrw2 = 0x00020004;
SDRAM[0].EmcMrw3 = 0x00030002;
SDRAM[0].EmcMrwResetCommand = 0x003f0000;
SDRAM[0].EmcMrwResetNInitWait = 0x0000000a;
SDRAM[0].EmcAdrCfg1 = 0x00060302;
SDRAM[0].EmcAdrCfg = 0x01060302;
SDRAM[0].McEmemCfg = 0x00080000;
SDRAM[0].McLowLatencyConfig = 0x80000003;
SDRAM[0].EmcCfg2 = 0x00000403;
SDRAM[0].EmcCfgDigDll = 0xe0000413;
SDRAM[0].EmcCfgClktrim0 = 0x00000000;
SDRAM[0].EmcCfgClktrim1 = 0x00000000;
SDRAM[0].EmcCfgClktrim2 = 0x00000000;
SDRAM[0].EmcCfg = 0x0001ff00;
SDRAM[0].EmcDbg = 0x01000020;
SDRAM[0].AhbArbitrationXbarCtrl = 0x00010000;
SDRAM[0].EmcDllXformDqs = 0x00000010;
SDRAM[0].EmcDllXformQUse = 0x00000008;
SDRAM[0].WarmBootWait = 0x00000001;
SDRAM[0].EmcCttTermCtrl = 0x00000802;
SDRAM[0].EmcOdtWrite = 0x00000000;
SDRAM[0].EmcOdtRead = 0x00000000;
SDRAM[0].EmcZcalRefCnt = 0x00000000;
SDRAM[0].EmcZcalWaitCnt = 0x0000001b;
SDRAM[0].EmcZcalMrwCmd = 0x000a0056;
SDRAM[0].EmcMrwZqInitDev0 = 0x800a00ff;
SDRAM[0].EmcMrwZqInitDev1 = 0x400a00ff;
SDRAM[0].EmcMrwZqInitWait = 0x00000001;
SDRAM[0].EmcDdr2Wait = 0x00000000;
SDRAM[0].PmcDdrPwr = 0x00000000;
SDRAM[0].ApbMiscGpXm2CfgAPadCtrl = 0x77ffc000;
SDRAM[0].ApbMiscGpXm2CfgCPadCtrl2 = 0x08080040;
SDRAM[0].ApbMiscGpXm2CfgCPadCtrl = 0x77fffff8;
SDRAM[0].ApbMiscGpXm2CfgDPadCtrl2 = 0x00000000;
SDRAM[0].ApbMiscGpXm2CfgDPadCtrl = 0x77fffff8;
SDRAM[0].ApbMiscGpXm2ClkCfgPadCtrl = 0x77ffc000;
SDRAM[0].ApbMiscGpXm2CompPadCtrl = 0x01f1f008;
SDRAM[0].ApbMiscGpXm2VttGenPadCtrl = 0x00005500;
Click to expand...
Click to collapse
I tested the cbootimg you sent. It does not show OdmData line for me too, but the cbootimg from the nvidia git site shows it.
bitdomo said:
I tested the cbootimg you sent. It does not show OdmData line for me too, but the cbootimg from the nvidia git site shows it.
Click to expand...
Click to collapse
Many thanks for your test, I'll try the nvidia one when i have a minute...
dear bitdomo,
My phone too stuck on logo LG. I try extracting KDZ su880 rom. I have got img files. ( recovery.img, bootloader.img...)
I want to flash them via NVflash but i dont know command... Can you help me command to flash recovery.img & bootloadet.img ?
*my bootloader.img was extracted from su880 KDZ , i think no need EDIT with HEX Editor & delete the bunch of FF hex values from the end of the file.
i try using bootloader.bin in bootloader_installer ultility. Run install_gb_bootloader.bat. Seem all was complete. But cannot connect to S/W mode
Thanks !
Copy every img file to your nvflash folder (bootloader.img, recovery.img, boot.img (kernel) )
Open a cmd.
Go to your nvflash folder in cmd.
Connect phone in APX mode to PC
Type these commands in cmd:
Code:
nvflash.exe --bl bootloader.img --download 4 bootloader.img
nvflash.exe -r --download 6 recovery.img
nvflash.exe -r --download 12 boot.img
nvflash.exe -r --go
(-r = --resume)
Wait until the screen goes off or wait 15-20 seconds then unplug your phone.
If the sending bootloader hangs up at some point then delete the FF hex valuess from the end of the bootloader.img and try again.
You can find a bootloader in my attachment of this post which already has FF hex values removed.
bitdomo said:
Copy every img file to your nvflash folder (bootloader.img, recovery.img, boot.img (kernel) )
Open a cmd.
Go to your nvflash folder in cmd.
Connect phone in APX mode to PC
Type these commands in cmd:
Code:
nvflash.exe --bl bootloader.img --download 4 bootloader.img
nvflash.exe -r --download 6 recovery.img
nvflash.exe -r --download 12 boot.img
nvflash.exe -r --go
(-r = --resume)
Wait until the screen goes off or wait 15-20 seconds then unplug your phone.
If the sending bootloader hangs up at some point then delete the FF hex valuess from the end of the bootloader.img and try again.
You can find a bootloader in my attachment of this post which already has FF hex values removed.
Click to expand...
Click to collapse
There are no words to show my gratitude! I reallythrilling now. My phone was rescued, my friend !
Seem Those commands not working with imgs extract from v19c, bitdomo ? I flash v19c KDZ via MartFlash---> Root---> Install Recovery ( but failed )----> Phone stuck logo LG...
I cannot flash bootloader.img,although i delete the FF hex valuess from the end of the bootloader.img.
I am a bit lost. To make things clear please anwser these questions:
1. If I understand well you were able to unbrick your phone with the instruction I wrote to you. Right?
2. What recovery do you want to flash and how? Send me a link for that recovery or the app which flashes the recovery.
3. Can you post here what error message appears when you try to nvflash bootloader? Copy the content of the whole cmd window here, please.
There is a final version of ics rom v20c for su880. v19c is a beta rom if I am not mistaken. I can send you a link if you are intrested in v20c
Edit: v19c is an ics rom and ics rom has locked bootloader therefore it cannot be used with nvflash. You have to use the bootloader from my attachment to flash v19c bootloader.
nvflash.exe --bl mybootloader.img --download 4 v19cbootloader.img
Sent from my LG-P990 using xda app-developers app
bitdomo said:
I am a bit lost. To make things clear please anwser these questions:
...
Click to expand...
Click to collapse
Thanks for help, bitdomo !
1. I unbricked phone with the instruction you wrote , in the previous with v10m kdz. Then I reflash with v19c KDZ & install recovery ( below tut) , Phone brick.
2. I want to install any recovery to flash a custom rom (Jelly Bean). And i folow this link: http://forum.xda-developers.com/showthread.php?t=2281636
3. cmd window when i flash booloader & recovery img file with the contruction you wrote ( with img files extract from v19c kdz )---> view attachment picture.
4. I use the bootloader from your attachment with edit in BAT file [ nvflash.exe --bl mybootloader.img --download 4 v19cbootloader.img ],then run new BAT file, a cmd window appear in the moment ( about 1/3 second) and disappear. nothing is happend...
If v19c cannot be used with nvflash, can you creat BAT file to run & flash stock recovery v19c ?
picture cmd window

[MOD][CM12][COLOROS 2][HYDROGENOS] Splash Screen Image Injector v1.2

This is a program that I wrote to decode the newer style "logo.bin" files used in some OPPO, and OnePlus devices. Please read below so you can better understand this type of encoding being used:
What Is A Raw Image?
A raw image, whether it be a file or an image in memory, is simply pixel data. There is no extra information like width, height, name, end of line... Absolutely nothing, just pixel data. If you have an image that is raw and the resolution is 1080x1920 and you are using a typical RGB24 or BGR24 (like the ones used here), then your exact filesize or size in memory will be 1080x1920x3! We use 3 here because there is one byte for the R or red component, one for the G (green), and one for the B(blue).
What Is A Run Length Encoded Image?
A run length image encoding uses a count ;usually a single byte (char), 2 bytes (short int), or 4 bytes (long int); and then the pixel components. So instead of writing out 300 bytes of '0's to make a line of 100 black pixels. Black is RGB(0,0,0). You could encode this as 100, 0, 0, 0. And only use 4 bytes of data to get the exact same image as the 300 byte raw image. All the run length encoding I've found, except the Motorola style which is a little different, use a run length encoding that is pixel-oriented like this.
Now I've figured out this new one and it is a byte-oriented run length encoding. This is for runs of bytes, not pixels. You may think, well whats the big deal? When you add a little area of color, you increase the run length encoded image in you logo.bin immensely! You use 6 bytes per pixel if there aren't any runs of color data. If you had an image that was a 1080x1920 black image with a 25 pixel wide, by 25 pixel high red box in the middle. The encoder would be doing runs of black data efficiently until it reached the red area.
.....0 255 0 255 0 255 0 255 0 255 0 133 /// we've reached the top left corner of the red square /// 13 1 30 1 255 1 // << that was just one red pixel!! in bgr color order (13, 30, 255) <<// And it keeps going through the rest of the red pixels on that line using 6 bytes per pixel, which is the opposite of compression. Before reaching the red square the encoding was decoding to 255 zeros over and over, until finally 133 zeros. 255 zeros is 85 black pixels stored in just 2 bytes!
This type of encoding is only good for grey scale images. It is not good with color, but it still will handle color of course. In grey scale, the Red, Blue, and Green data components are always the same values. All the way from black (0,0,0) to white (255, 255, 255); including every shade of grey in between>>>(1,1,1) (2,2,2) (3,3,3)....(243, 243, 243) (244, 244, 244)<<<
One other difference in this method of run length encoding is that the color byte is before the count, which is backwards from all of the other methods.​
The attachment contains the C source code (which is also in the 2nd post) and the executable that was compiled using mingw32 on a 64 bit Windows 7 pc. The png library that I used is LodePng, the source is in the download.
To use logoinjector:
Decode your logo.bin:
Code:
logoInjector.exe -i logo.bin -d
All the PNG 's will be extracted from logo.bin. Edit the PNGs that you want to change...
Note:
Your original "logo.bin" file is never changed, it is just read. If the file you try to load isn't a logo.bin file, or if it is the older style, then the program will tell you and exit​
Inject the image(s) back in to the logo.bin:
Code:
logoinjector.exe -i logo.bin -j image_name_1 image_name_3
To list whats in your logo file:
Code:
logoinjector.exe -i logo.bin -l
For a more detailed list:
Code:
logoinjector.exe -i logo.bin -L
If the colors are messed up use the "-s" switch while decoding.
Code:
logoinjector.exe -i logo.bin -d -s
If you had to use the "-s" switch to decode properly, you'll have to use it to inject also:
Code:
logoinjector.exe -i logo.bin -j image_name -s
Note:
With version 1.2, you can put as many names after "-j" as you want, and it's not case sensitive. You also don't have to put the whole name. If you just put "-j fhd" every image in the logo.bin that starts with "fhd" will be injected. There has to be a PNG with the name in the directory though​
The size of your modified.logo.bin will displayed along with the original size, if everything went good. Please know the size of you logo partition. I made this program to encompass any device using this format, and there is no set size of the logo partition between devices. Fastboot will just error out if you try to flash data bigger than the partition before it writes anything. But if someone gets brave and trys to "DD" to the logo partition, it could get ugly.:cyclops:
Flash the "modified.logo.bin" file through fastboot.
v1.2
made it possible for multiple injections in one command
doesn't add png to the decoded png if it was already in the name
fixed out of scope with image 26 in OPPO find 7 logo.bin
added LodePng source in the download
made the default color order BGR
displays the modified logo file size as well as the original file size
runs the modified.logo.bin back through the list function after injecting
checks the number of offsets between the original and modified logo.bin
Use this at your own risk.
Always make backups.
Always.
Code:
/*
/*
* Logo Injector v1.2
*
* Copyright (C) 2015 Joseph Andrew Fornecker
* makers_mark @ xda-developers.com
* [email protected]
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* opinion) any later version. See <http://www.gnu.org/licenses/gpl.html>
*
* New in v1.2:
*
* - Fixed out of scope crash involving image #26 in oppo find 7 logo.bin (26 IS BIG)
* - Multiple injection names possible after the -j parameter
* - Injection names are now case insensitive
* - BGR is the the default color order, instead of RGB
* - Added more error checks
* - Show the change in file size of original logo.bin compare to the modified logo.bin
* - Several small changes dealing with readability
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdint.h>
#include "lodepng.h"
#define SWAP32(x) (( x >> 24 )&0xff) | ((x << 8)&0xff0000) | ((x >> 8)&0xff00) | ((x << 24)&0xff000000)
#define BLOCK 512
#define OFFSETSTART 48
#define BYTESPERPIXEL 3
#define MAXOFFSETS 28
#define SIZEOFLONGINT 4
#define TWOTOTHETEN 1024
typedef struct {
uint8_t header[8];
uint8_t blank[24];
uint32_t width;
uint32_t height;
uint32_t lengthOfData;
uint32_t special;
uint32_t offsets[MAXOFFSETS];
uint8_t name[64];
uint8_t metaData[288];
} IMAGEHEAD;
uint16_t Copy(FILE *, IMAGEHEAD *, uint16_t , uint16_t, FILE *);
int32_t InjectNewStyle(FILE *, IMAGEHEAD *, uint16_t , uint8_t *, uint16_t, FILE *, uint32_t * );
int32_t RewriteHeaderZero( uint32_t , uint16_t, FILE* , int32_t, uint32_t * );
uint32_t Encode(uint8_t*, uint8_t*, uint32_t);
uint32_t GetEncodedSize(uint8_t*, uint32_t);
uint32_t GetWidth(FILE*);
uint32_t GetHeight(FILE*);
uint64_t BlockIt(uint32_t);
uint16_t GetNumberOfOffsets(FILE*);
int32_t DecodeLogoBin(FILE*, IMAGEHEAD *);
int32_t ListFileDetails(FILE*, IMAGEHEAD *);
uint8_t* Decode(FILE*, uint32_t, uint32_t, uint32_t, uint8_t*);
int32_t IsItTheNewStyle(FILE*);
IMAGEHEAD* ParseHeaders(FILE*, uint16_t);
int32_t IsItALogo(FILE*);
void PrintFileSize(uint32_t);
uint32_t GetFileSize(FILE *);
uint16_t badAss = 0;
int16_t rgb2bgr = 1;
uint16_t convertToPNG = 1;
uint8_t HEADER[] = {0x53,0x50,0x4C,0x41,0x53,0x48,0x21,0x21};
int32_t IsItALogo(FILE *originalLogoBin){
uint8_t string[9];
uint16_t i;
fread(string, 1, 8, originalLogoBin);
for (i = 0 ; i < 8 ; i++){
if (string[i] == HEADER[i]){
continue;
} else {
return 0;
}
}
return 1;
}
int32_t IsItTheNewStyle(FILE *originalLogoBin){
int32_t newStyle = 0;
fread(&newStyle, 1, SIZEOFLONGINT, originalLogoBin);
if (newStyle == 0){
return 1;
} else {
return 0;
}
}
IMAGEHEAD *ParseHeaders(FILE *originalLogoBin, uint16_t numberOfOffsets){
uint8_t i = 0;
IMAGEHEAD *imageHeaders;
imageHeaders = malloc(BLOCK * numberOfOffsets);
memset(imageHeaders, 0, BLOCK * numberOfOffsets);
fseek(originalLogoBin, 0, SEEK_SET);
fread(&imageHeaders[i], 1 , BLOCK, originalLogoBin);
for ( i = 1 ; i < numberOfOffsets ; ++i ){
fseek(originalLogoBin, imageHeaders[0].offsets[i], SEEK_SET);
fread(&imageHeaders[i], 1 , BLOCK, originalLogoBin);
}
return imageHeaders;
}
uint16_t GetNumberOfOffsets(FILE *originalLogoBin){
uint16_t i = 0;
uint32_t readAs = 0;
fseek(originalLogoBin, OFFSETSTART, SEEK_SET);
while(i < MAXOFFSETS){
fread(&readAs, 1, SIZEOFLONGINT, originalLogoBin);
if ((readAs == 0) && (i != 0)){
break;
} else {
i++;
}
}
return i;
}
uint8_t* Decode(FILE *originalLogoBin, uint32_t start, uint32_t length, uint32_t imageBytes, uint8_t* image){
uint32_t decodedBytes = 0, i = 0;
uint8_t* data;
fseek(originalLogoBin, start, SEEK_SET);
data = (uint8_t*)malloc(length);
if (fread(data, 1, length, originalLogoBin) != length) {
fprintf(stderr, "Could not read file!!\n");
exit(0);
}
while((i < length) && (decodedBytes < imageBytes)){
memset(&image[decodedBytes], data[i], (data[i + 1]));
decodedBytes += (uint8_t)data[i+1];
i += 2;
if ((i < length) && (imageBytes - decodedBytes < (uint8_t)data[i + 1])){
memset(&image[decodedBytes], data[i], imageBytes - decodedBytes);
decodedBytes = imageBytes;
fprintf(stdout, "More information was in encoding than resolution called for.\n");
break;
}
}
fprintf(stdout, "%ld decoded bytes\n", decodedBytes);
free(data);
if( rgb2bgr == 1 ){
uint8_t old;
i = 0;
while( i < imageBytes){
old = image[i];
memset(&image[i], image[i + 2], 1);
memset(&image[i + 2], old, 1);
i += BYTESPERPIXEL;
}
}
return image;
}
int32_t DecodeLogoBin(FILE *originalLogoBin, IMAGEHEAD *imageHeaders){
uint32_t size, imageBytes, start;
uint8_t* image;
uint8_t name[65];
uint8_t r = 0;
uint16_t i , numberOfOffsets = GetNumberOfOffsets(originalLogoBin);
for ( i = 0 ; i < numberOfOffsets ; i++ ){
fprintf(stdout,"\n\n\n#%d: Offset:%ld\n", i + 1, imageHeaders[0].offsets[i]);
if ((imageHeaders[i].width == 0) || (imageHeaders[i].height == 0)){
fprintf(stdout, "Placeholder for %s\n", imageHeaders[i].metaData);
continue;
}
fprintf(stdout, "Header=%s\nWidth=%ld\nHeight=%ld\nData Length=%ld\nSpecial=%ld\nName=%s\nMetadata=%s\n",
imageHeaders[i].header, imageHeaders[i].width, imageHeaders[i].height,
imageHeaders[i].lengthOfData, imageHeaders[i].special, imageHeaders[i].name, imageHeaders[i].metaData);
if (convertToPNG){
start = imageHeaders[0].offsets[i] + BLOCK;
imageBytes = imageHeaders[i].width * (imageHeaders[i].height) * BYTESPERPIXEL;
image = malloc(imageBytes);
uint8_t lengthOfName = strlen(imageHeaders[i].name);
uint8_t *ext;
ext = strrchr(imageHeaders[i].name, '.');
if (((ext[1] == 'p') || (ext[1] == 'P')) &&
((ext[2] == 'n') || (ext[2] == 'N')) &&
((ext[3] == 'g') || (ext[3] == 'G')) &&
((ext[0] == '.'))){
sprintf(name, "%s", imageHeaders[i].name);
} else {
sprintf(name, "%s.png", imageHeaders[i].name);
}
lodepng_encode24_file(name, Decode(originalLogoBin, (uint32_t)start, (uint32_t)imageHeaders[i].lengthOfData, (uint32_t)imageBytes, image) , (unsigned)imageHeaders[i].width, (unsigned)imageHeaders[i].height);
free(image);
}
}
return 0;
}
int32_t ListFileDetails(FILE *originalLogoBin, IMAGEHEAD *imageHeaders){
uint32_t i = 0, j = 0;
fseek(originalLogoBin, 0, SEEK_SET);
uint16_t numberOfOffsets = GetNumberOfOffsets(originalLogoBin);
fprintf(stdout, "Resolution\tOffset\tName\n");
fprintf(stdout, "-------------------------------------------------------------\n");
for ( i = 0 ; i < numberOfOffsets ; i++ ){
if ((imageHeaders[i].width == 0) || (imageHeaders[i].height == 0)){
fprintf(stdout, "(placeholder) for %s\n", imageHeaders[i].metaData);
continue;
}
fprintf(stdout,"%dx%d\t", imageHeaders[i].width, imageHeaders[i].height);
if ((imageHeaders[i].width < 1000) && (imageHeaders[i].height <1000)){fprintf(stdout, "\t");}
fprintf(stdout, "%ld\t%s\n", imageHeaders[0].offsets[i], imageHeaders[i].name );
}
return 1;
}
uint16_t Copy(FILE *originalLogoBin, IMAGEHEAD *imageHeaders, uint16_t numberOfOffsets, uint16_t injectionNumber, FILE *modifiedLogoBin){
uint8_t *data;
uint32_t offset, originalOffset;
uint32_t imageSize = BlockIt(BLOCK + imageHeaders[injectionNumber].lengthOfData);
if( imageHeaders[injectionNumber].name[0] == 0){
fprintf(stdout, "Copying \t#%d:(placeholder) %s\n", injectionNumber + 1 , imageHeaders[injectionNumber].metaData);
} else {
fprintf(stdout, "Copying \t#%d:%s\n", injectionNumber + 1 , imageHeaders[injectionNumber].name);
}
data = malloc(imageSize);
memset(data, 0 , imageSize);
fread(data, 1, imageSize, originalLogoBin);
fwrite(data, 1 , imageSize, modifiedLogoBin);
free(data);
}
int32_t InjectNewStyle(FILE *originalLogoBin, IMAGEHEAD *imageHeaders, uint16_t numberOfOffsets, uint8_t *injectionName, uint16_t injectionNumber, FILE *modifiedLogoBin, uint32_t *ihMainOffsets ){
uint32_t encodedSize = 0, actualWritten = 0, imageSize = 0;
uint8_t *data, *header;
int8_t inFileName[69];
int32_t blockDifference;
uint32_t offset, originalOffset;
FILE *pngFile;
sprintf(inFileName, "%s", injectionName);
if (imageHeaders[injectionNumber].special != 1){
fprintf(stdout, "ERROR: \"Special\" is not equal to '1' \nThis would not be safe to flash!\nPlease email logo.bin in question to:\[email protected]\n");
fclose(originalLogoBin);
fclose(modifiedLogoBin);
return 0;
}
if ((pngFile = fopen(inFileName, "rb")) == NULL){
sprintf(inFileName, "%s.png", injectionName);
if ((pngFile = fopen(inFileName, "rb")) == NULL){
fclose(pngFile);
fclose(modifiedLogoBin);
fclose(originalLogoBin);
fprintf(stderr, "%s could not be read\n", inFileName);
return 0;
}
}
IMAGEHEAD new;
memset(new.blank, 0, sizeof(new.blank));
memset(new.metaData, 0, sizeof(new.metaData));
memset(new.offsets, 0, SIZEOFLONGINT * MAXOFFSETS);
strncpy(new.header, HEADER , 8);
strncpy(new.metaData, imageHeaders[injectionNumber].metaData, sizeof(imageHeaders[injectionNumber].metaData));
strncpy(new.name, injectionName, 64);
new.special = 1;
fprintf(stdout, "Injecting\t#%d:%s\n", injectionNumber + 1 , imageHeaders[injectionNumber].name);
if (((new.width = GetWidth(pngFile)) != imageHeaders[injectionNumber].width) && (!badAss)){
fprintf(stderr, "Error: Width of PNG to be injected is %d, it must be %d!\n", new.width, imageHeaders[injectionNumber].width);
fclose(pngFile);
fclose(modifiedLogoBin);
fclose(originalLogoBin);
return 0;
}
if (((new.height = GetHeight(pngFile)) != imageHeaders[injectionNumber].height) && (!badAss)){
fprintf(stderr, "Error: Height of PNG to be injected is %d, it must be %d!\n", new.height, imageHeaders[injectionNumber].height);
fclose(pngFile);
fclose(modifiedLogoBin);
fclose(originalLogoBin);
return 0;
}
uint32_t rawBytes = new.width * new.height * BYTESPERPIXEL;
uint8_t *decodedPNG = malloc(rawBytes);
lodepng_decode24_file(&decodedPNG, (uint32_t*)&new.width, (uint32_t*)&new.height , (const uint8_t*)inFileName);
if (rgb2bgr == 1){
uint8_t old;
uint32_t k = 0;
while( k < rawBytes ){
old = decodedPNG[k];
memset(&decodedPNG[k], decodedPNG[k + 2], 1);
memset(&decodedPNG[k + 2], old, 1);
k += BYTESPERPIXEL;
}
}
encodedSize = GetEncodedSize(decodedPNG, (new.width * new.height * BYTESPERPIXEL));
new.lengthOfData = encodedSize;
uint8_t *rlEncoded = malloc(BlockIt(encodedSize));
memset(rlEncoded, 0, BlockIt(encodedSize));
actualWritten = Encode(decodedPNG, rlEncoded, (new.width * new.height * BYTESPERPIXEL));
blockDifference = (((BLOCK + BlockIt(actualWritten)) - (BLOCK + BlockIt(imageHeaders[injectionNumber].lengthOfData))) / BLOCK);
fwrite(&new, 1 , BLOCK, modifiedLogoBin);
fwrite(rlEncoded, 1 , BlockIt(actualWritten), modifiedLogoBin);
free(decodedPNG);
free(rlEncoded);
RewriteHeaderZero( injectionNumber , numberOfOffsets , modifiedLogoBin , blockDifference, ihMainOffsets);
fclose(pngFile);
return 1;
}
int32_t RewriteHeaderZero( uint32_t injectionImageNumber , uint16_t numberOfOffsets, FILE *modifiedLogoBin , int32_t blockDifference, uint32_t *ihMainOffsets){
uint8_t i, j = injectionImageNumber + 1 ;
uint32_t filePosition = ftell(modifiedLogoBin);
uint32_t offset = 0;
for( ; j < numberOfOffsets; j++){
fseek(modifiedLogoBin, OFFSETSTART + (SIZEOFLONGINT * j), SEEK_SET);
offset = ihMainOffsets[j];
offset += (blockDifference * BLOCK);
fseek(modifiedLogoBin, OFFSETSTART + (SIZEOFLONGINT * j), SEEK_SET);
fwrite(&offset, 1 , SIZEOFLONGINT , modifiedLogoBin);
ihMainOffsets[j] = offset;
}
fseek(modifiedLogoBin, filePosition , SEEK_SET);
return;
}
uint32_t GetEncodedSize(uint8_t* data, uint32_t size){
uint32_t pos = 0, ret = 0;
uint16_t count = 1;
for( pos = 0 ; pos < size ; ++pos , count = 1){
while((pos < size - 1) && (count < 0xFF) && ((memcmp(&data[pos], &data[pos+1], 1)) == 0)){
count++;
pos++;
}
ret += 2;
}
return ret;
}
uint32_t Encode(uint8_t* rawRgbReading, uint8_t* rlEncoded, uint32_t rawSize){
uint32_t writePosition = 0 , readPosition = 0;
uint16_t count = 1;
for( readPosition = 0 ; readPosition < rawSize ; ++readPosition , count = 1){
while((readPosition < rawSize - 1 ) && (count < 0xFF) && ((memcmp(&rawRgbReading[readPosition], &rawRgbReading[readPosition+1], 1)) == 0)){
count++;
readPosition++;
}
rlEncoded[writePosition] = rawRgbReading[readPosition];
rlEncoded[writePosition + 1] = count;
writePosition += 2;
}
return writePosition;
}
uint32_t GetWidth(FILE *pngFile){
uint32_t width;
fseek(pngFile, 16, SEEK_SET);
fread(&width, 1, SIZEOFLONGINT, pngFile);
return(SWAP32(width));
}
uint32_t GetHeight(FILE *pngFile){
uint32_t height;
fseek(pngFile, 20, SEEK_SET);
fread(&height, 1, SIZEOFLONGINT, pngFile);
return(SWAP32(height));
}
uint64_t BlockIt(uint32_t isize){
uint32_t blockSize = BLOCK;
if ((isize % blockSize) == 0){
return isize;
}else{
return isize + (blockSize - (isize % blockSize));
}
}
void Usage(){
fprintf(stdout, "Usage: logoinjector -i \"input file\" [-l] | [-L] | [-d [-s]] | [-j \"image to be replaced\" [-b] | [-s]]\n\n");
fprintf(stdout, "Mandatory Arguments:\n\n");
fprintf(stdout, "\t-i \"C:\\xda\\logo.bin\"\n");
fprintf(stdout, "\t This is the logo.bin file to analyze or inject an image\n\n");
fprintf(stdout, "Optional Arguments:\n\n");
fprintf(stdout, "\t-d Decode all images into PNGs, (-s)wap parameter may be needed for proper color.\n");
fprintf(stdout, "\t-l Lower case 'L' is to display a short list of what is inside the input file.\n");
fprintf(stdout, "\t-L Upper case 'L' is for a more detailed list of logo.bin image contents.\n");
fprintf(stdout, "\t-b 'b' is used to tell the program to disregard width or height differences\n");
fprintf(stdout, "\t when encoding an image, the program also won't fail if it can't find a name\n");
fprintf(stdout, "\t that can't be found on the inject list when encoding images\n");
fprintf(stdout, "\t-s 's' is used to swap RGB and BGR color order. Can be used on decoding or encoding.\n");
fprintf(stdout, "\t NEW IN THIS V1.2: Swap is on by default, meaning the color order will be BGR. Using\n");
fprintf(stdout, "\t the \"-s\" switch will result in a RGB color order. Bottom line: If you (-d)ecode the\n");
fprintf(stdout, "\t images (that have color) and the colors aren't right, then you should use (-s) to \n");
fprintf(stdout, "\t decode and inject images.\n");
fprintf(stdout, "\t-j \"image(s) to be replaced\"\n");
fprintf(stdout, "\t The image(s) name to be replaced as seen in the (-l)ist\n");
fprintf(stdout, "\t NEW IN THIS V1.2: Multiple image names may be put after \"-j\"\n");
fprintf(stdout, "\t The names simply need to be separated by a space. The names now also are not case\n");
fprintf(stdout, "\t sensitive, and it doesn't matter if you put the extension at the end of the name.\n");
fprintf(stdout, "\t You actually only need to put the first characters of the name.\nExample:\n");
fprintf(stdout, "\t logoinjector -i \"your_logo.bin\" -j FHD \n\n");
fprintf(stdout, "\t This will inject a PNG for every name in the logo bin that begins with \"fhd\"\n");
return;
}
void PrintFileSize(uint32_t bytes){
float megaBytes = 0, kiloBytes = 0;
kiloBytes = (float)bytes / (float)TWOTOTHETEN;
megaBytes = kiloBytes / (float)TWOTOTHETEN;
if (kiloBytes < (float)TWOTOTHETEN){
fprintf(stdout, "\t%.2f KB\n", kiloBytes);
} else {
fprintf(stdout, "\t%.2f MB\n", megaBytes);
}
return;
}
uint32_t GetFileSize(FILE *temp){
fseek(temp, 0 , SEEK_END);
uint32_t fileSizeZ = ftell(temp);
return(fileSizeZ);
}
int32_t main(int32_t argc, int8_t **argv){
int32_t c;
int16_t h, i , j , k = 0;
FILE *originalLogoBin = NULL, *modifiedLogoBin = NULL;
uint8_t *inputFile = NULL;
uint8_t *injectNames[MAXOFFSETS];
int16_t decodeAllOpt = 0;
int16_t encodeOpt = 0;
int16_t inject = 0;
int16_t listFile = 0;
uint16_t numberOfOffsets = 0, injected = 0;
for(i = 0; i < MAXOFFSETS; i++){
injectNames[i] = NULL;
}
fprintf(stdout, "__________________________________________________________-_-\n");
fprintf(stdout, "Logo Injector v1.2\n\nWritten By Makers_Mark @ XDA-DEVELOPERS.COM\n");
fprintf(stdout, "_____________________________________________________________\n\n");
while ((c = getopt (argc, (char**)argv, "sSj:J:hHbBdDlLi:I:")) != -1){
switch(c)
{
case 'l':
listFile = 1;
break;
case 'L':
decodeAllOpt = 1;
convertToPNG = 0;
break;
case 'i':
case 'I':
inputFile = optarg;
break;
case 'b':
case 'B':
badAss = 1;
break;
case 'j':
case 'J':
h = optind - 1 ;
uint8_t *nextArg;
while(h < argc){
inject = 1;
nextArg = strdup(argv[h]);
h++;
if(nextArg[0] != '-'){
injectNames[k++] = nextArg;
} else {
break;
}
}
optind = h - 1;
break;
case 'd':
case 'D':
decodeAllOpt = 1 ;
break;
case 's':
case 'S':
rgb2bgr = -1 ;
break;
case 'h':
case 'H':
Usage();
return 0;
break;
default:
Usage();
return 0;
break;
}
}
if (inputFile == NULL){
Usage();
return 0;
}
fprintf(stdout, "FILE: %s\n_____________________________________________________________\n\n", inputFile);
if (rgb2bgr == 1){
fprintf(stdout, "BGR is the color order. Use \"-s\" switch to change it to RGB.\n\n");
} else {
fprintf(stdout, "RGB is the color order. Use \"-s\" switch to change it to BGR.\n\n");
}
if ((originalLogoBin = fopen(inputFile, "rb")) == NULL){
fprintf(stderr, "%s could not be opened\n", inputFile);
return 0;
}
if (!IsItALogo(originalLogoBin)){
fprintf(stdout, "\nThis is NOT a valid Logo.bin\n\n");
fclose(originalLogoBin);
return 0;
}
if (!IsItTheNewStyle(originalLogoBin)){
fprintf(stdout, "\nThis is the old style logo.bin\n\n");
fclose(originalLogoBin);
return 0;
}
numberOfOffsets = GetNumberOfOffsets(originalLogoBin);
IMAGEHEAD *imageHeaders = ParseHeaders(originalLogoBin, numberOfOffsets);
if (listFile){
ListFileDetails(originalLogoBin, imageHeaders);
return 1;
}
if(inject){
uint32_t ihMainOffsets[MAXOFFSETS];
uint8_t found = 0, exitFlag = 0;
for (i = 0; i < MAXOFFSETS ; i++){
ihMainOffsets[i] = 0;
}
for (j = 0; j < k ; j++){
for (i = 0 ; i < numberOfOffsets ; i++ ){
if((strcasecmp(imageHeaders[i].name, injectNames[j]) == 0) ||
(strncasecmp(imageHeaders[i].name, injectNames[j], strlen(injectNames[j])) == 0)){
found = 1;
break;
} else {
found = 0;
}
}
if (!found){
fprintf(stdout, "ERROR: \"%s\" is not in the logo bin !!!!\n", injectNames[j]);
exitFlag = 1;
}
}
if ((exitFlag) && (!badAss)){
fclose(originalLogoBin);
exit(0);
}
memcpy(&ihMainOffsets , &imageHeaders[0].offsets, SIZEOFLONGINT * MAXOFFSETS);
fseek(originalLogoBin, 0, SEEK_SET);
if ((modifiedLogoBin = fopen("modified.logo.bin", "wb+")) == NULL){
fclose(modifiedLogoBin);
fclose(originalLogoBin);
fprintf(stderr, "modified.logo.bin could not be opened\n");
return 0;
}
for (i = 0 ; i < numberOfOffsets ; i++ , injected = 0 ){
for (j = 0; j < k ; j++){
if((strcasecmp(imageHeaders[i].name, injectNames[j]) == 0) ||
(strncasecmp(imageHeaders[i].name, injectNames[j], strlen(injectNames[j])) == 0)){
if (InjectNewStyle(originalLogoBin, imageHeaders , numberOfOffsets, imageHeaders[i].name, i, modifiedLogoBin, ihMainOffsets) == 0){
fprintf(stderr, "Error: Injecting %s\n", imageHeaders[i].name);
fclose(originalLogoBin);
fclose(modifiedLogoBin);
return 0;
}
if ( i != numberOfOffsets - 1 ){
fseek(originalLogoBin, imageHeaders[0].offsets[i+1], SEEK_SET);
}
injected = 1;
break;
}
}
if (!injected){
Copy(originalLogoBin , imageHeaders, numberOfOffsets, i, modifiedLogoBin);
}
}
uint16_t modifiedNumberOfOffsets = 0;
if (GetNumberOfOffsets(modifiedLogoBin) != numberOfOffsets){
fprintf(stderr, "ERROR: The number of offsets doesn't match the Original file!!\n");
fclose(modifiedLogoBin);
if (!badAss){
unlink("modified.logo.bin");
}
exit(0);
}
fprintf(stdout, "\n\nContents of the NEW \"modified.logo.bin\":\n");
fprintf(stdout, "VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV\n\n");
ListFileDetails(modifiedLogoBin, imageHeaders);
fprintf(stdout, "\n\n_____________________________________________________________\nOriginal filesize: ");
PrintFileSize(GetFileSize(originalLogoBin));
fprintf(stdout, "Modified filesize: ");
PrintFileSize(GetFileSize(modifiedLogoBin));
fprintf(stdout, "-------------------------------------------------------------\n");
fclose(originalLogoBin);
fclose(modifiedLogoBin);
return 1;
}
if (decodeAllOpt){
DecodeLogoBin(originalLogoBin, imageHeaders);
fclose(originalLogoBin);
return 1;
}
fclose(originalLogoBin);
return 1;
}
Terrific, this works. Thank you a lot!
After a little trial-and-error and some time in our beloved QHSUSB_DLOAD mode, I finally got it to work! I own a OnePlus One, and I had to use the -s parameter to get it to work correctly. Just a heads-up for any OPO owners who wants to use this. Great work, OP!
treChoy said:
After a little trial-and-error and some time in our beloved QHSUSB_DLOAD mode, I finally got it to work! I own a OnePlus One, and I had to use the -s parameter to get it to work correctly. Just a heads-up for any OPO owners who wants to use this. Great work, OP!
Click to expand...
Click to collapse
Thanks for chiming in, I was going to ask you to test for me initially. Can you elaborate on what happened?
makers_mark said:
Thanks for chiming in, I was going to ask you to test for me initially. Can you elaborate on what happened?
Click to expand...
Click to collapse
Just a foreword that I was using a Windows 8.1 machine, which is bound to be the cause of some of the issues I ran into.
After I unzipped the program and put the logo.bin in the extracted folder, I kept running the commands, but each time, I'd get an error message saying that the program didn't support my OS version, or something to that effect. I tried rewording the commands, but to no avail. Eventually, I just deleted the whole folder and extracted the package again. That seemed to do the trick.
So I had all the images extracted, and I created the ones I wanted to replace. There was a bit of confusion repackaging the image, since the OPO's logo.bin places the ".png" into the name of the images, but eventually, I got it all right. I flashed the modified logo.bin, but when I tried to reboot, my computer started installing drivers for QHSUSB. This had happened before when I was playing around with the LOGO partition, and it was an easy fix. I just jammed the power button for 30 seconds, and prayed to God. Thankfully, the phone booted up, but the splash screen I had created had its colors messed up. I assumed that I needed to swap the red and the blue, so I used the parameter you provided and packaged a new splash screen. I flashed it, and everything looked fine.
It's definitely a little more intimidating than the tool that @chillstep1998 created, but with a little trial-and-error, it's certainly doable. Great work!
Oh, yeah. I needed to use the -s parameter too and I skipped putting the logo.bin in through fastboot - I just modded an install zip and flashed it in with TWRP.
Thanks for this program. Glad that it's back from someone for CM12 as we waited for quite some time now. I have a query though about repacking.
logoinjector.exe -i logo.bin -j (image name you want to replace)
Is it possible to put different file names at the same time if I want to replace two or three files at the same time like this
logoinjector.exe -i logo.bin -j 4-fastboot.png 5-lowpower.png
because it doesn't work for me, I will have to run this command for the number of times I have files to replaced?
Does this method work with custom roms based on nightly cm 12.1?I'm currently on exodus rom.
Spyrious said:
Does this method work with custom roms based on nightly cm 12.1?I'm currently on exodus rom.
Click to expand...
Click to collapse
I suppose it should because logo.bin would be same for all those roms.
Sent from my "GT-I9300/1+1" powered by Carbon Rom & Boeffla/ak Kernel
Fueled by 7000mAh ZeroLemon Battery
Awesome! I had to also use the -s parameter but it worked great. Thanks OP.
Is this an appropriate place to start sharing logos or do we need a separate thread for that?
makers_mark said:
Code:
/*
* Logo Injector v1.0
[/QUOTE]
WOW - Thanks !
I've waited a LONG time for this !
Few things to let you know
1. On my Win 8.1 x64 I run Comodo CIS - which prevents LogoInjector.exe from creating the PNG images after I run "logoInjector.exe -i logo.bin -d".
This is of course the behavior of a false-positive, the overprotection of comodo A/V.
So once I temporary disable it -LogoInjector can successfully create the PNGs.
2. I also, as already reported, needed to use the -s switch inorder to get the right colors
3. I would also very much appreciate if it will be possible to inject multiple images at once with one command.
4. I can advise to update the OP with the size limits of the logo.bin ( if there is at all )
I injected a 276KB png into 335KB logo.bin and got a modified logo.bin size 12,171KB ( 12MB ! ) - never the less - After I flashed it - everything is OK.
5. I can advise to put in the OP a link to a tool/method ( if exist at all ) that can enable extraction of the current installed logo.bin from the phone it self.
button line - VERY GOOD WORK ! :good: :good: :good::highfive:
[B][U]EDIT:[/U][/B]
I attach a[B] FLASHABLE ZIP FILE that INSTALLS the logo.bin[/B] found inside the zip.
just replace the logo.bin in the root of the zip with your custom made "logo.bin".
This method is an alternative to the fastboot command "fastboot flash LOGO logo.bin"
Click to expand...
Click to collapse
330kb modified bootlogo
I got a 330KB modified logo.bin file
Isn't it supposed to be around 16MB?
I'm currently on cm12.1 06/08/2015 (DD/MM/YYYY)
ranger1021994 said:
I got a 330KB modified logo.bin file
Isn't it supposed to be around 16MB?
I'm currently on cm12.1 06/08/2015 (DD/MM/YYYY)
Click to expand...
Click to collapse
Size depends on the size of embedded images.
Sent from my "GT-I9300/1+1" powered by Carbon Rom & Boeffla/ak Kernel
Fueled by 7000mAh ZeroLemon Battery
LOGO.bin file size
nicesoni_ash said:
Size depends on the size of embedded images.
Sent from my "GT-I9300/1+1" powered by Carbon Rom & Boeffla/ak Kernel
Fueled by 7000mAh ZeroLemon Battery
Click to expand...
Click to collapse
My original LOGO file is 16MB big.
How can my modified file be only 330KB?
I don't know what is causing the file size to come down drastically from 16MB to just 330KB. Is it normal? Because I'm not sure it is
ranger1021994 said:
My original LOGO file is 16MB big.
How can my modified file be only 330KB?
I don't know what is causing the file size to come down drastically from 16MB to just 330KB. Is it normal? Because I'm not sure it is
Click to expand...
Click to collapse
Check all image files size individually and if the difference is not that huge then surely something is wrong.
Sent from my "GT-I9300/1+1" powered by Carbon Rom & Boeffla/ak Kernel
Fueled by 7000mAh ZeroLemon Battery
nicesoni_ash said:
Check all image files size individually and if the difference is not that huge then surely something is wrong.
Click to expand...
Click to collapse
ranger1021994 said:
My original LOGO file is 16MB big.
How can my modified file be only 330KB?
I don't know what is causing the file size to come down drastically from 16MB to just 330KB. Is it normal? Because I'm not sure it is
Click to expand...
Click to collapse
gps3dx said:
I injected a 276KB png into 335KB logo.bin and got a modified logo.bin size 12,171KB ( 12MB ! ) - never the less - After I flashed it - everything is OK.
Click to expand...
Click to collapse
@read my quote.
if you enter an image with only ONE COLOR background ( Same RBG values, not gradient ! ) it can drastically lower the final file size.
You can of course use black as background color and crop the images size to your content, so that the cropped areas will be filled automatically by the OPO as black color.
The idea here is that if you'll have full sized photo (1080x1920) with small area content (like 300x400), it contains black areas ( for no reason ) which enlarges the final file size - which make no sense.
nevertheless, Read my quote, as you can see I flash a ~12MB file while the original file was 335KB - and everything works!
I have a stupid question, how can I know whether I have a CM12 or CM11 logo in my oneplus? I have flashed CM11 as a primary rom and flashed CM12 as a secondary rom. I do remember that I flashed a CM12 zip to be able to flash CM12 as a secondary rom but that's a faint memory and I want to be sure before flashing a logo because last time I did that, I lost everything in my Oneplus and had to start from the beginning first by reviving it from its dead state.
Thanks.
nicesoni_ash said:
I have a stupid question, how can I know whether I have a CM12 or CM11 logo in my oneplus? I have flashed CM11 as a primary rom and flashed CM12 as a secondary rom. I do remember that I flashed a CM12 zip to be able to flash CM12 as a secondary rom but that's a faint memory and I want to be sure before flashing a logo because last time I did that, I lost everything in my Oneplus and had to start from the beginning first by reviving it from its dead state.
Thanks.
Click to expand...
Click to collapse
EDIT: Deleted for misinformation
It works!!
gps3dx said:
@read my quote.
if you enter an image with only ONE COLOR background ( Same RBG values, not gradient ! ) it can drastically lower the final file size.
You can of course use black as background color and crop the images size to your content, so that the cropped areas will be filled automatically by the OPO as black color.
The idea here is that if you'll have full sized photo (1080x1920) with small area content (like 300x400), it contains black areas ( for no reason ) which enlarges the final file size - which make no sense.
nevertheless, Read my quote, as you can see I flash a ~12MB file while the original file was 335KB - and everything works!
Click to expand...
Click to collapse
AMAZING!
It works!!
Finally
Thanks a lot!

Categories

Resources