[11/24/2011] Adb tools/Mod tools [WIP] - HTC EVO 3D

Here is a simple script for adb push and more.​Developed by Chubbzlou and myself.​
Over the coming days there will be more added. Some will be for experienced developers while some for the newer developers. My goal is to make a one stop tool to help with the following.
Changelog 11/24/2011
Updated the menu to simplify the options plus added HP Touchpad support
New Link
Changelog 10/12/2011
Ok, things got overhauled on this one to simplify things more. Currently there are 23 options with most of them working. The zip menu isn't working 100% but other than that you will have a lot of usefull stuff here.
It's been reorganized to the following.
Section 1
Apk editing
* Framework apks
* Decompile apks
* Compile apks
* Sign apks
* Install apks
* Compile/sign, install apks
Section 2
Classes.dex
* Decompile Classes.dex
* Compile classes.dex
Section 3
Logcat Menu
* Screen Logcat
* Logcat Text
Section 4
Push/Pull Menu
* Push system/folders
* Push data/app
* Pull system from phone
* Adb Shell
* Push to sdcard to create pushed folder or to root of sdcard
* New Back up your sdcard
Section 5
Reboot Menu
* Reboot Phone
* Reboot to Recovery
* Reboot to Bootloader
Section 6
Zip Menu
* Extract apk (not fuctional)
* Zip apk (not functional)
* Zip align/Png opting (completely functional now)
* Compression level (not functional)
Section 7
Odexing Menu
* You can now choose this for an automated odexing. It will odex your ROM, pull system/app and system/framework to device/app and device/framework
edit: Confirmed it will do multiple zipalign/opt pngs. Place apks in folder called apks. Choose menu 22, select zp. It will place them in tools/optimized. However, you have to hit enter after each apk for now. we are working on a fix to move folder to main directory and fix the hit enter. this will let you zipalign and opt all the apks and walk away.
Mirror
More to come...
Credit:
Chubbz, for helping with a lot of the scripting and ideas. Viddywell, thanks for your help. TommyT, your Android Utility inspired me to simplify things, Misfit, testing is always appreciated! Also, Virus. Always helping the community. Thanks brotha!

Sounds like we're thinking on similar wavelengths in terms of making things more easy and user friendly.
I am working on a wrapper to help with troubleshooting and running pre checks to assure any adb scripts will run properly here.
Interested in combining the two?

viddywell said:
Sounds like we're thinking on similar wavelengths in terms of making things more easy and user friendly.
I am working on a wrapper to help with troubleshooting and running pre checks to assure any adb scripts will run properly here.
Interested in combining the two?
Click to expand...
Click to collapse
sure
Plans are to expand this a lot more. Add decomplie/compile classes.dex, decompile/compile apks and jars, and sign non system jars, decompile systemui, framework-res, resources.apks and configure them to ur needs and recompile.
I am tired of using 4-5 different folders when one would surfice.

OMG man this is exactly what I've been wanting to see for the longest time...I'm not very familiar with ADB although I've been wanting to get to learn it for the longest time...thanks a bunfh man...much appreciated as always....
Sent from my PG86100 using Tapatalk

reverepats said:
OMG man this is exactly what I've been wanting to see for the longest time...I'm not very familiar with ADB although I've been wanting to get to learn it for the longest time...thanks a bunfh man...much appreciated as always....
Sent from my PG86100 using Tapatalk
Click to expand...
Click to collapse
+1 thanks Leo!

Nice write up as always Leo
Sent from the CM powered 3d

Leoisright said:
sure
Plans are to expand this a lot more. Add decomplie/compile classes.dex, decompile/compile apks and jars, and sign non system jars, decompile systemui, framework-res, resources.apks and configure them to ur needs and recompile.
I am tired of using 4-5 different folders when one would surfice.
Click to expand...
Click to collapse
Sounds good to me - I see a lot of wasted effort around troubleshooting and working through the basics that can be eliminated by building solid tools.
I've put our two works together. I renamed the file to adbtool.bat, you can change it to whatever you'd like but I'd steer you away from using the name "command" as it is also the same as the system variable for calling the cmd window on a machine.
You can test this by running the script with your device unplugged - that's the only time my portion should do anything. Otherwise it will jump right down to your section.
The .bat is attached and the code below:
Code:
@echo off
REM ========================================================================================================
REM PRE CHECK TEST SCRIPT WRITTEN BY VIDDYWELL (XDA)
REM FURTHER DETAILS AND FUTURE UPDATES AVAILABLE @ http://forum.xda-developers.com/showthread.php?t=1294880
REM ========================================================================================================
REM ====================== BEGIN PRE CHECK TEST SCRIPT ======================
:top
color f0
set reportrun=0
REM Check for HTC Sync
tasklist | findstr htcUPCTLoader >nul
If %errorlevel% equ 0 (set htcsync=1) ELSE (set htcsync=0)
REM Check for Easy Tether
tasklist | findstr easytthr >nul
If %errorlevel% equ 0 (set easyt=1) ELSE (set easyt=0)
REM Check for device connection
adb devices | findstr /r "device$" >nul
If %errorlevel% neq 0 goto devmis
REM Get device state (this can be used as an error checking variable later if necessary)
for /f %%a in ('adb get-state') do @set state=%%a
cls
Echo Device found! In %state% mode.
GOTO ADBCODE
REM ====================== ERROR HANDLING BELOW ======================
exit
:devmis
set sys=n
color 4f
CLS
Echo No device found - please check the following items:
Echo.
If %htcsync% equ 1 Echo - HTC Sync found - Please try disabling
If %easyt% equ 1 Echo - Easy Tether found - Please try disabling
Echo - Device is connected
Echo - USB Debugging is enabled
Echo.
Echo ------------------------------------------
Echo We can collect further information to assist with troubleshooting.
Echo This will query your system and generate a report with information
Echo about your computer. You will be given a chance to review and edit
Echo the collected information and share via copy/paste. No information
Echo will be shared without your consent.
Echo.
Set /p sys=Would you like to collect system information (y/n):
if /I %sys% equ y GOTO sysinfo
if /I %sys% equ yes sysinfo
goto tryagain
:tryagain
cls
echo.
If %reportrun% equ 1 (echo Text from window can be copied to forum for troubleshooting)
Echo Press any key to try running script again
Pause >nul
goto top
:sysinfo
Echo System information - Generated on %date% at %time% >report.txt
Echo ----------------------------------------------------- >>report.txt
echo ADB Version: >>report.txt
adb version >>report.txt
Echo. >>report.txt
echo Windows Version: >>report.txt
ver >>report.txt
Echo. >>report.txt
Echo Files in Directory of Script Execution >>report.txt
dir /b >>report.txt
Echo. >>report.txt
Echo Running Applications: >>report.txt
tasklist >>report.txt
Echo. >>report.txt
Echo Started Services: >>report.txt
sc query >>report.txt
start "" report.txt
set reportrun=1
goto tryagain
REM ====================== END PRE CHECK TEST SCRIPT ======================
REM ========================================================================================================
REM CODE BELOW THIS LINE WRITTEN BY LEOISRIGHT (XDA)
REM FURTHER DETAILS AND FUTURE UPDATES AVAILABLE @ http://forum.xda-developers.com/showthread.php?t=1297096
REM ========================================================================================================
:ADBCODE
setlocal enabledelayedexpansion
COLOR f0
mode con:cols=70 lines=34
setLocal EnableDelayedExpansion
cls
echo.
:restart
echo. **presented by Leoisright**
echo.
echo.
echo HELLO WHAT CAN I DO FOR YOU
echo.
echo.
ECHO 1 - CMD
echo.
ECHO 2 - Logcat
echo.
ECHO 3 - push system/folders
echo.
ECHO 4 - push data/app
echo.
ECHO 5 - Reboot to Recovery
echo.
ECHO 6 - Pull System from phone
echo.
set M=GARBAGE
SET /P M= Choose a Task then press ENTER:
IF %M%==1 GOTO CMD
IF %M%==2 GOTO LOGCAT
IF %M%==3 GOTO push
IF %M%==4 GOTO adb push data/app
IF %M%==5 GOTO RECOVERY
IF %M%==6 GOTO pull system
if %M%==7 GOTO Adb Shell
echo.
:CMD
start %windir%\system32\cmd.exe
cls
goto restart
echo.
echo.
:LOGCAT
start %windir%\system32\cmd.exe /k adb logcat
cls
goto restart
echo.
echo.
:push
start %windir%\system32\cmd.exe /k adb push push/system system/
cls
goto restart
echo.
echo.
cls
:adb push data/app
cd adb push
start %windir%\system32\cmd.exe /k adb push push/data/app data/app
cls
goto restart
echo.
echo.
cls
goto restart
:RECOVERY
cd TOOLS
adb reboot recovery
echo.
echo.
cls
:pull system
cd adb pull
start %windir%\system32\cmd.exe /k adb pull system xron/
cls
goto restart
echo.
echo.
cls

viddywell said:
Sounds good to me - I see a lot of wasted effort around troubleshooting and working through the basics that can be eliminated by building solid tools.
I've put our two works together. I renamed the file to adbtool.bat, you can change it to whatever you'd like but I'd steer you away from using the name "command" as it is also the same as the system variable for calling the cmd window on a machine.
You can test this by running the script with your device unplugged - that's the only time my portion should do anything. Otherwise it will jump right down to your section.
The .bat is attached and the code below:
Code:
@echo off
REM ========================================================================================================
REM PRE CHECK TEST SCRIPT WRITTEN BY VIDDYWELL (XDA)
REM FURTHER DETAILS AND FUTURE UPDATES AVAILABLE @ http://forum.xda-developers.com/showthread.php?t=1294880
REM ========================================================================================================
REM ====================== BEGIN PRE CHECK TEST SCRIPT ======================
:top
color f0
set reportrun=0
REM Check for HTC Sync
tasklist | findstr htcUPCTLoader >nul
If %errorlevel% equ 0 (set htcsync=1) ELSE (set htcsync=0)
REM Check for Easy Tether
tasklist | findstr easytthr >nul
If %errorlevel% equ 0 (set easyt=1) ELSE (set easyt=0)
REM Check for device connection
adb devices | findstr /r "device$" >nul
If %errorlevel% neq 0 goto devmis
REM Get device state (this can be used as an error checking variable later if necessary)
for /f %%a in ('adb get-state') do @set state=%%a
cls
Echo Device found! In %state% mode.
GOTO ADBCODE
REM ====================== ERROR HANDLING BELOW ======================
exit
:devmis
set sys=n
color 4f
CLS
Echo No device found - please check the following items:
Echo.
If %htcsync% equ 1 Echo - HTC Sync found - Please try disabling
If %easyt% equ 1 Echo - Easy Tether found - Please try disabling
Echo - Device is connected
Echo - USB Debugging is enabled
Echo.
Echo ------------------------------------------
Echo We can collect further information to assist with troubleshooting.
Echo This will query your system and generate a report with information
Echo about your computer. You will be given a chance to review and edit
Echo the collected information and share via copy/paste. No information
Echo will be shared without your consent.
Echo.
Set /p sys=Would you like to collect system information (y/n):
if /I %sys% equ y GOTO sysinfo
if /I %sys% equ yes sysinfo
goto tryagain
:tryagain
cls
echo.
If %reportrun% equ 1 (echo Text from window can be copied to forum for troubleshooting)
Echo Press any key to try running script again
Pause >nul
goto top
:sysinfo
Echo System information - Generated on %date% at %time% >report.txt
Echo ----------------------------------------------------- >>report.txt
echo ADB Version: >>report.txt
adb version >>report.txt
Echo. >>report.txt
echo Windows Version: >>report.txt
ver >>report.txt
Echo. >>report.txt
Echo Files in Directory of Script Execution >>report.txt
dir /b >>report.txt
Echo. >>report.txt
Echo Running Applications: >>report.txt
tasklist >>report.txt
Echo. >>report.txt
Echo Started Services: >>report.txt
sc query >>report.txt
start "" report.txt
set reportrun=1
goto tryagain
REM ====================== END PRE CHECK TEST SCRIPT ======================
REM ========================================================================================================
REM CODE BELOW THIS LINE WRITTEN BY LEOISRIGHT (XDA)
REM FURTHER DETAILS AND FUTURE UPDATES AVAILABLE @ http://forum.xda-developers.com/showthread.php?t=1297096
REM ========================================================================================================
:ADBCODE
setlocal enabledelayedexpansion
COLOR f0
mode con:cols=70 lines=34
setLocal EnableDelayedExpansion
cls
echo.
:restart
echo. **presented by Leoisright**
echo.
echo.
echo HELLO WHAT CAN I DO FOR YOU
echo.
echo.
ECHO 1 - CMD
echo.
ECHO 2 - Logcat
echo.
ECHO 3 - push system/folders
echo.
ECHO 4 - push data/app
echo.
ECHO 5 - Reboot to Recovery
echo.
ECHO 6 - Pull System from phone
echo.
set M=GARBAGE
SET /P M= Choose a Task then press ENTER:
IF %M%==1 GOTO CMD
IF %M%==2 GOTO LOGCAT
IF %M%==3 GOTO push
IF %M%==4 GOTO adb push data/app
IF %M%==5 GOTO RECOVERY
IF %M%==6 GOTO pull system
if %M%==7 GOTO Adb Shell
echo.
:CMD
start %windir%\system32\cmd.exe
cls
goto restart
echo.
echo.
:LOGCAT
start %windir%\system32\cmd.exe /k adb logcat
cls
goto restart
echo.
echo.
:push
start %windir%\system32\cmd.exe /k adb push push/system system/
cls
goto restart
echo.
echo.
cls
:adb push data/app
cd adb push
start %windir%\system32\cmd.exe /k adb push push/data/app data/app
cls
goto restart
echo.
echo.
cls
goto restart
:RECOVERY
cd TOOLS
adb reboot recovery
echo.
echo.
cls
:pull system
cd adb pull
start %windir%\system32\cmd.exe /k adb pull system xron/
cls
goto restart
echo.
echo.
cls
Click to expand...
Click to collapse
Good work Bro. Adbtool is much better. I set out to make a simple folder so I could push multiple libs/apps/bin for porting purposes. I will refine my scripts to be more Refined. While I've used lots of great bats, none are an all in one utility.
Tommytomatoe has a fantastic android utility for ubuntu and we need the same stuff for windows.
Let's keep building this. I will keep the OP updated
Sent from my PG86100 using Tapatalk

Hell yea nice, thanx
Sent from my PG86100 using XDA App

updated the thread more and have better adb .bat file for everyone. thanks

Good **** leo definitely gonna give this a shot
Sent from my PG86100 using Tapatalk

OP has been updated with more options and better description of the menu.

Leoisright said:
OP has been updated with more options and better description of the menu.
Click to expand...
Click to collapse
Thanks for the excellent contribution Leo, thanks chubbz!

Leo, your the best. This is Awesome!! Can't wait to be able to compile apks. Thanks for all you do for me and the rest of the community.

Tiffany84 said:
Leo, your the best. This is Awesome!! Can't wait to be able to compile apks. Thanks for all you do for me and the rest of the community.
Click to expand...
Click to collapse
we are very very close to compile right now. Also, we may have figured out a way to extract a zip to folder and zip it back up. will be nice to extract roms this way...mod, then zip back up

Leoisright said:
we are very very close to compile right now. Also, we may have figured out a way to extract a zip to folder and zip it back up. will be nice to extract roms this way...mod, then zip back up
Click to expand...
Click to collapse
WoW!! Just sounding better and better. Please, if you don't mind and can remember, keep me informed on your progress.

solver404 said:
Thanks for the excellent contribution Leo, thanks chubbz!
Click to expand...
Click to collapse
No prob just a little contibution for you guys. Enjoy

Looking good, this will help out so many people

Update. Will fill out OP more later but probaly will have another update before.. Enjoy.
Still a WIP but lots of stuff added.

Very nice tool. Keeps me from having to type adb commands out. Just one comment/suggestion:
Shouldn't the system be mounted before executing adb push(es)??

Related

[SCRIPT] Block or Allow B&N OTA Updates

Attached, Just run the blockupdates.bat file then sit back and relax. Obviously you need the Nook plugged in and ADB access enabled.
Code:
echo off
cls
echo *****************************************
echo * We will create the directory .Android *
echo * We will also create the adb_usb.ini *
echo *****************************************
md "%USERPROFILE%\.Android"
echo 0x2080 > "%USERPROFILE%\.Android\adb_usb.ini"
echo Success
adb kill-server
adb devices
echo ************************
echo * Blocking OTA Updates *
echo ************************
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb pull /data/data/com.bn.devicemanager/databases/devicemanager.db devicemanager.db
sqlite3 devicemanager.db "update registry set value='manual' where name='com.bn.device.fota.mode';"
adb push devicemanager.db /data/data/com.bn.devicemanager/databases/devicemanager.db
del devicemanager.db
ping -n 2 127.0.0.1 >NUL
echo Success
adb reboot
adb kill-server
echo *****************************
echo * You nook is rebooting! *
echo * Disconnect the USB cable! *
echo * Done :) *
echo * *
echo * www.thexboxexpert.com *
echo *****************************
pause
exit
To allow access to updated run the following script the same way above was ran.
Code:
echo off
cls
echo *****************************************
echo * We will create the directory .Android *
echo * We will also create the adb_usb.ini *
echo *****************************************
md "%USERPROFILE%\.Android"
echo 0x2080 > "%USERPROFILE%\.Android\adb_usb.ini"
echo Success
adb kill-server
adb devices
echo ************************
echo * Allowing OTA Updates *
echo ************************
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb pull /data/data/com.bn.devicemanager/databases/devicemanager.db devicemanager.db
sqlite3 devicemanager.db "update registry set value='auto' where name='com.bn.device.fota.mode';"
adb push devicemanager.db /data/data/com.bn.devicemanager/databases/devicemanager.db
del devicemanager.db
ping -n 2 127.0.0.1 >NUL
echo Success
adb reboot
adb kill-server
echo *****************************
echo * You nook is rebooting! *
echo * Disconnect the USB cable! *
echo * Done :) *
echo * *
echo * www.thexboxexpert.com *
echo *****************************
pause
exit
Thanks xbox, your a scripting genius, I'm not worthy.......
Do we need "shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system" in the script? I'm a noob and I don't know what this does...
Because the other thread (http://forum.xda-developers.com/showthread.php?t=933291) doesn't mention this.
redking79 said:
Do we need "shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system" in the script? I'm a noob and I don't know what this does...
Because the other thread (http://forum.xda-developers.com/showthread.php?t=933291) doesn't mention this.
Click to expand...
Click to collapse
Just run the script and stop asking questions - j/k
That sets rw to the system folder until reboot. Eliminating any errors that might occur. To successfully answer your question, no you do not need it in the script but it doesn't effect anything negatively either.
xboxexpert said:
Just run the script and stop asking questions
That sets rw to the system folder until reboot. Eliminating any errors that might occur. To successfully answer your question, no you do not need it in the script but why are you editing my scrip in the first place :/
Click to expand...
Click to collapse
I am not editing your script nor doubting your abilities, but I'm asking because I want to learn.
redking79 said:
I am not editing your script nor doubting your abilities, but I'm asking because I want to learn.
Click to expand...
Click to collapse
Edited my response due to the fact that I've been working for 13 hours and am edgy I know you wanted to learn sorry for that read my edited post up top
redking79 said:
Do we need "shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system" in the script? I'm a noob and I don't know what this does...
Because the other thread (http://forum.xda-developers.com/showthread.php?t=933291) doesn't mention this.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=933291 is where this came from, of course.... So probably better to ask there.
xbox just likes reposting things.. I guess he's making it slightly more user friendly so he can sell it on ebay.
I try running this script and keep getting "sqlite3 is not an internal or external file " and will not complete. I just installed the combo adb driver pack and everything installed fine. Can anyone help?
xboxexpert said:
Attached, Just run the blockupdates.bat file then sit back and relax. Obviously you need the Nook plugged in and ADB access enabled.
Code:
echo off
cls
echo *****************************************
echo * We will create the directory .Android *
echo * We will also create the adb_usb.ini *
echo *****************************************
md "%USERPROFILE%\.Android"
echo 0x2080 > "%USERPROFILE%\.Android\adb_usb.ini"
echo Success
adb kill-server
adb devices
echo ************************
echo * Blocking OTA Updates *
echo ************************
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb pull /data/data/com.bn.devicemanager/databases/devicemanager.db devicemanager.db
sqlite3 devicemanager.db "update registry set value='manual' where name='com.bn.device.fota.mode';"
adb push devicemanager.db /data/data/com.bn.devicemanager/databases/devicemanager.db
del devicemanager.db
ping -n 2 127.0.0.1 >NUL
echo Success
adb reboot
adb kill-server
echo *****************************
echo * You nook is rebooting! *
echo * Disconnect the USB cable! *
echo * Done :) *
echo * *
echo * www.thexboxexpert.com *
echo *****************************
pause
exit
Click to expand...
Click to collapse
khaytsus said:
http://forum.xda-developers.com/showthread.php?t=933291 is where this came from, of course.... So probably better to ask there.
xbox just likes reposting things.. I guess he's making it slightly more user friendly so he can sell it on ebay.
Click to expand...
Click to collapse
ebay got suspended months ago
Are there any sqlite apps in market to edit DBs on nook itself?
Jf-ws6. You likely need to install the android sdk on your PC.
bonzer2u said:
Jf-ws6. You likely need to install the android sdk on your PC.
Click to expand...
Click to collapse
I do have android sdk on my PC. i used this link and downloaded the combo sdk and driver.
http://forum.xda-developers.com/showthread.php?t=910008
JF-WS6 said:
I do have android sdk on my PC. i used this link and downloaded the combo sdk and driver.
http://forum.xda-developers.com/showthread.php?t=910008
Click to expand...
Click to collapse
Ahhh, did u edit/add to your path in windows?????????
# This step is optional but makes using ADB a lot easier
1. Start > Right-Click Computer > Properties > Advanced > Environment Variables
2. Under 'System Variables', scroll down to 'Path' and double click it
3. In 'Variable Value', scroll to the end and add ";C:\android-sdk-windows\platform-tools;C:\android-sdk-windows\tools" (without the quotes)
Read more: http://nookdevs.com/NookColor_USB_ADB#ixzz1CpsmBNGE
Under Creative Commons License: Attribution Non-Commercial Share Alike
bonzer2u said:
Ahhh, did u edit/add to your path in windows?????????
# This step is optional but makes using ADB a lot easier
1. Start > Right-Click Computer > Properties > Advanced > Environment Variables
2. Under 'System Variables', scroll down to 'Path' and double click it
3. In 'Variable Value', scroll to the end and add ";C:\android-sdk-windows\platform-tools;C:\android-sdk-windows\tools" (without the quotes)
Read more: http://nookdevs.com/NookColor_USB_ADB#ixzz1CpsmBNGE
Under Creative Commons License: Attribution Non-Commercial Share Alike
Click to expand...
Click to collapse
I'll try this tonight. Hope it works
confirmation of being run?
Since this was a Windows .bat file I ended up running the commands manually at a Linux shell prompt. The NC definitely rebooted, but is there an easy way to tell if the OTA updates were actually turned off?
Thanks!
Robert
Robertjm said:
Since this was a Windows .bat file I ended up running the commands manually at a Linux shell prompt. The NC definitely rebooted, but is there an easy way to tell if the OTA updates were actually turned off?
Thanks!
Robert
Click to expand...
Click to collapse
Unfortunately no. That's why I prefered to do it manually. Nothing wrong with the script but I just felt more confident doing each step myself and typing it in and making sure everything was what I expected. I did the block two days ago on my AutoNootered 1.01 NC and have used it extensively and haven't received any updates.
redking79 said:
Unfortunately no. That's why I prefered to do it manually. Nothing wrong with the script but I just felt more confident doing each step myself and typing it in and making sure everything was what I expected. I did the block two days ago on my AutoNootered 1.01 NC and have used it extensively and haven't received any updates.
Click to expand...
Click to collapse
You should never get updated as long as you maintain the 'manual' setting as described. I also do it manually but thats a personal preference, I asked xbox to script it as a courtesy to others that have asked since he is a scripin kinda guy....
bonzer2u said:
Ahhh, did u edit/add to your path in windows?????????
# This step is optional but makes using ADB a lot easier
1. Start > Right-Click Computer > Properties > Advanced > Environment Variables
2. Under 'System Variables', scroll down to 'Path' and double click it
3. In 'Variable Value', scroll to the end and add ";C:\android-sdk-windows\platform-tools;C:\android-sdk-windows\tools" (without the quotes)
Read more: http://nookdevs.com/NookColor_USB_ADB#ixzz1CpsmBNGE
Under Creative Commons License: Attribution Non-Commercial Share Alike
Click to expand...
Click to collapse
Ok, did the path edit and still no luck. still says "sqlite3 is not recognized as an internal or external command, operable program or batch file"
I'm starting to get very frustrated!!!!! anymore ideas? i really dont want the update and each day goes by my chances go up. my wife's got updated yesterday. hers is stock though. please help....
ADB Wireless
I edited the bat file and added an "adb connect IPORT" for wireless ADB (app in market). This is a much simpler method than trying to install the USB driver.
Thanks worked
For me!
Sent from my LogicPD Zoom2 using XDA App

[TOOL][WIN]Take screenshots of Aroma and Recovery v1.1

This is a tool to capture screenshots while in Recovery or the Aroma Installer.
Support has ended, due to the possibility of pixel formats changing from each recovery update you receive.
But I did make a better Recovery Screenshot that handles this problem, and it can be found here or below.:cyclops:
http://forum.xda-developers.com/showthread.php?p=50029759​
It's no big secret around XDA that you can use the program FFmpeg to convert your raw framebuffer file into a normal image file. I've found the values for the Nexus 5 and made a batch script that incorporates the programs adb, and ffmpeg; to save screenshots to your computer. I don't have a Nexus 5, but thanks to an XDA user, @ikslawlok, who posted his raw framebuffer from TWRP 2.6.3.4 on another website, I was able to get it working. Also thanks to @rootSU for testing in Philz, a CWM based recovery. This should work on all versions of Windows. I have only tested in Windows 7 personally. The process, as far as using ffmpeg and adb, used here is also possible in Linux. Some versions of ffmpeg for Linux are antiquated, hence there isn't really a write one script; work for all.
Why would anyone use this or do this?
Most people, that probably includes you reading this, have actually no use for it, nor can you think of a reason too. The uses of this are limited to people that write tutorials, custom recovery themes, and the rare event that you have an anomaly in your recovery and you can't describe it.
I owe a big thanks to @Whiskey103 with his work in this thread over in the HTC One forum. :good:
You have to have the adb drivers installed before you can do anything. Go here for more information.
This rar file contains the programs adb and ffmpeg. This 32-bit version of ffmpeg is one of the newest versions available on their downloads page. You must have adb.exe, ffmpeg.exe, and the two dll files for adb in the same directory as the batch file. The easiest thing to do is just extract the rar to a new directory, then run the file named "RUNrsn511.bat" The screenshots you capture will be saved in the same folder that you unzipped everything in as 'timestamp'.png
Thank you @weihan1102 for helping me test and providing your framebuffer from the modified version of TWRP for multirom!
Download Recovery Screenshot v1.1
If you have already downloaded the original version, and wish to update with support for the modified twrp for multirom without downloading the whole new rar, then hit the button below.
The only difference is the RUNrs.bat batch script. You may wish to just download the new batch file here, it is only 1.7KB zipped. It is RUNrsn511.rar and can just be unzipped into the folder you originally unzipped the other files into. I would then delete the original batch file.
An easier way, I think, is to click show content below and click anywhere in the box. Hit Ctrl+A to select everything, hit Ctrl+C to copy it to the clipboard. Then right click on your original RUNrs.bat file, and select edit. Click in that screen anywhere, hit Ctrl+A to select everything in there, then Ctrl+V to paste the new batch script into RUNrs.bat.
Code:
@ECHO OFF
CLS
TITLE Recovery Screenshot v1.1
MODE CON:COLS=54 LINES=40
COLOR 0B
SET TS=0
SET "ffshowb=-hide_banner"
SET "ffdebug=-loglevel fatal"
IF "%~1"=="-d" (
REM @ECHO ON
SET "ffdebug=-loglevel debug"
SET "ffshowb=%"
MODE CON:COLS=140 LINES=250
COLOR 07
ECHO __________________________________________________________________
ECHO DEBUG INFO
ECHO __________________________________________________________________
)
:START
ECHO[
ECHO ______________________________________________________
ECHO This will pull a screenshot from your Nexus 5 and
ECHO save it to the directory that you ran this bat
ECHO file in. Connect USB ^& reboot into your recovery.
ECHO ______________________________________________________
ECHO Thanks to Whiskey103 for the idea!!
ECHO Written by makers_mark
ECHO ______________________________________________________
IF NOT EXIST ffmpeg.exe GOTO NOFILES
IF NOT EXIST adb.exe GOTO NOFILES
ADB kill-server -d >nul 2>&1
IF %TS%=="NOGOOD" GOTO SKIPPEDthatPause
ECHO Press 1 or 2
ECHO 1 - Save a screenshot using multirom twrp recovery
ECHO 2 - Save a screenshot using other recoveries
ECHO ______________________________________________________
CHOICE /C:12 >nul
IF ERRORLEVEL 1 SET K=1
IF ERRORLEVEL 2 SET K=2
IF %K%==1 SET "pixfmt=-pix_fmt rgb565"
IF %K%==2 SET "pixfmt=-pix_fmt rgb0"
:SKIPPEDthatPause
ECHO[
ECHO Pulling framebuffer from /dev/graphics/fb0
adb pull /dev/graphics/fb0 frmbfr >nul
IF ERRORLEVEL 1 (cls
SET TS="NOGOOD"
ECHO ______________________________________________________
ECHO Adb is not properly connected.
ECHO Try "Safely Removing" your N5 from your computer
ECHO Then unplug your usb cable, and reinsert it.
ECHO ______________________________________________________
ECHO[
ECHO[
ECHO Press any key to try again.
ECHO[
ECHO[
PAUSE >nul
CLS
GOTO START
)
SET TS=%DATE:/=%_%TIME::=_%
SET TS=%TS:.=%
SET TS=%TS: =%.png
FFMPEG %ffdebug% %ffshowb% -f rawvideo -vcodec rawvideo %pixfmt% -s 1088x1920 -i frmbfr -vf crop=1080:1920:0:0 -y %TS%
IF NOT EXIST %TS% GOTO ERRNE
DEL frmbfr >nul
ECHO ______________________________________________________
ECHO Screenshot saved as %TS%
ECHO ______________________________________________________
ECHO Press 1 or 2
ECHO 1 - Save another screenshot
ECHO 2 - Exit
ECHO ______________________________________________________
CHOICE /C:12 >nul
IF ERRORLEVEL 1 SET K=1
IF ERRORLEVEL 2 SET K=2
IF %K%==1 GOTO SKIPPEDthatPause
IF %K%==2 GOTO FINISH
:NOFILES
CLS
ECHO The directory that you are running this script in is:
ECHO %~dp0
ECHO[
ECHO You must run this script in the same directory as
ECHO adb.exe and ffmpeg.exe. Press any key to exit
PAUSE >nul
EXIT
:ERRNE
CLS
MODE CON:COLS=108 LINES=200
COLOR 07
FFMPEG -loglevel debug -f rawvideo -vcodec rawvideo %pixfmt% -s 1088x1920 -i frmbfr -vf crop=1080:1920:0:0 -y %TS%
ECHO ____________________________________________________________________________________________________________
ECHO There was a problem converting the framebuffer to a png file.
ECHO[
ECHO To capture the screen of the cmd window, hold down the alt key and press PrtSc on your keyboard. This
ECHO will save an image of the current window in memory on your clipboard. Then open paint or photoshop or
ECHO whatever program you use and hit ctrl+N to open a new file, then ctrl+V to paste an image. Save it and
ECHO please message me it or post in the XDA forum thread.
ECHO[
ECHO[
ECHO If you got to this screen and are not using a Nexus 5, congratulations for successfully pulling the
ECHO framebuffer. To figure out the resolution to use, try adding 4,8, or 16 to your native width to make it
ECHO evenly divisible by 32. Example resolution is 1080x1920..1080^/32^=33.75 ^< not right, so try 1088^/32^=34 ^< good
ECHO Only worry about width (left to right), height is stored orderly in memory.
ECHO[
ECHO To see a list of all of the pix_fmts supported by ffmpeg, run ffmpeg -pix_fmts
ECHO[
ECHO Press 1 or 2
ECHO 1 - Show available pixel formats
ECHO 2 - Exit
CHOICE /C:12
IF ERRORLEVEL 1 SET K=1
IF ERRORLEVEL 2 SET K=2
IF %K%==1 (cls
MODE CON:COLS=52 LINES=200
ffmpeg -hide_banner -pix_fmts
pause
GOTO FINISH)
IF %K%==2 GOTO FINISH
:FINISH
ADB kill-server -d
EXIT
I have more screenshots at my 2013 Nexus 7 thread.
Batch script v1.1
Code:
@ECHO OFF
CLS
TITLE Recovery Screenshot v1.1
MODE CON:COLS=54 LINES=40
COLOR 0B
SET TS=0
SET "ffshowb=-hide_banner"
SET "ffdebug=-loglevel fatal"
IF "%~1"=="-d" (
REM @ECHO ON
SET "ffdebug=-loglevel debug"
SET "ffshowb=%"
MODE CON:COLS=140 LINES=250
COLOR 07
ECHO __________________________________________________________________
ECHO DEBUG INFO
ECHO __________________________________________________________________
)
:START
ECHO[
ECHO ______________________________________________________
ECHO This will pull a screenshot from your Nexus 5 and
ECHO save it to the directory that you ran this bat
ECHO file in. Connect USB ^& reboot into your recovery.
ECHO ______________________________________________________
ECHO Thanks to Whiskey103 for the idea!!
ECHO Written by makers_mark
ECHO ______________________________________________________
IF NOT EXIST ffmpeg.exe GOTO NOFILES
IF NOT EXIST adb.exe GOTO NOFILES
ADB kill-server -d >nul 2>&1
IF %TS%=="NOGOOD" GOTO SKIPPEDthatPause
ECHO Press 1 or 2
ECHO 1 - Save a screenshot using multirom twrp recovery
ECHO 2 - Save a screenshot using other recoveries
ECHO ______________________________________________________
CHOICE /C:12 >nul
IF ERRORLEVEL 1 SET K=1
IF ERRORLEVEL 2 SET K=2
IF %K%==1 SET "pixfmt=-pix_fmt rgb565"
IF %K%==2 SET "pixfmt=-pix_fmt rgb0"
:SKIPPEDthatPause
ECHO[
ECHO Pulling framebuffer from /dev/graphics/fb0
adb pull /dev/graphics/fb0 frmbfr >nul
IF ERRORLEVEL 1 (cls
SET TS="NOGOOD"
ECHO ______________________________________________________
ECHO Adb is not properly connected.
ECHO Try "Safely Removing" your N5 from your computer
ECHO Then unplug your usb cable, and reinsert it.
ECHO ______________________________________________________
ECHO[
ECHO[
ECHO Press any key to try again.
ECHO[
ECHO[
PAUSE >nul
CLS
GOTO START
)
SET TS=%DATE:/=%_%TIME::=_%
SET TS=%TS:.=%
SET TS=%TS: =%.png
FFMPEG %ffdebug% %ffshowb% -f rawvideo -vcodec rawvideo %pixfmt% -s 1088x1920 -i frmbfr -vf crop=1080:1920:0:0 -y %TS%
IF NOT EXIST %TS% GOTO ERRNE
DEL frmbfr >nul
ECHO ______________________________________________________
ECHO Screenshot saved as %TS%
ECHO ______________________________________________________
ECHO Press 1 or 2
ECHO 1 - Save another screenshot
ECHO 2 - Exit
ECHO ______________________________________________________
CHOICE /C:12 >nul
IF ERRORLEVEL 1 SET K=1
IF ERRORLEVEL 2 SET K=2
IF %K%==1 GOTO SKIPPEDthatPause
IF %K%==2 GOTO FINISH
:NOFILES
CLS
ECHO The directory that you are running this script in is:
ECHO %~dp0
ECHO[
ECHO You must run this script in the same directory as
ECHO adb.exe and ffmpeg.exe. Press any key to exit
PAUSE >nul
EXIT
:ERRNE
CLS
MODE CON:COLS=108 LINES=200
COLOR 07
FFMPEG -loglevel debug -f rawvideo -vcodec rawvideo %pixfmt% -s 1088x1920 -i frmbfr -vf crop=1080:1920:0:0 -y %TS%
ECHO ____________________________________________________________________________________________________________
ECHO There was a problem converting the framebuffer to a png file.
ECHO[
ECHO To capture the screen of the cmd window, hold down the alt key and press PrtSc on your keyboard. This
ECHO will save an image of the current window in memory on your clipboard. Then open paint or photoshop or
ECHO whatever program you use and hit ctrl+N to open a new file, then ctrl+V to paste an image. Save it and
ECHO please message me it or post in the XDA forum thread.
ECHO[
ECHO[
ECHO If you got to this screen and are not using a Nexus 5, congratulations for successfully pulling the
ECHO framebuffer. To figure out the resolution to use, try adding 4,8, or 16 to your native width to make it
ECHO evenly divisible by 32. Example resolution is 1080x1920..1080^/32^=33.75 ^< not right, so try 1088^/32^=34 ^< good
ECHO Only worry about width (left to right), height is stored orderly in memory.
ECHO[
ECHO To see a list of all of the pix_fmts supported by ffmpeg, run ffmpeg -pix_fmts
ECHO[
ECHO Press 1 or 2
ECHO 1 - Show available pixel formats
ECHO 2 - Exit
CHOICE /C:12
IF ERRORLEVEL 1 SET K=1
IF ERRORLEVEL 2 SET K=2
IF %K%==1 (cls
MODE CON:COLS=52 LINES=200
ffmpeg -hide_banner -pix_fmts
pause
GOTO FINISH)
IF %K%==2 GOTO FINISH
:FINISH
ADB kill-server -d
EXIT
Batch script v1
Code:
@ECHO OFF
CLS
TITLE Recovery Screenshot
MODE CON:COLS=54 LINES=40
COLOR 0B
SET TS=0
SET "ffshowb=-hide_banner"
SET "ffdebug=-loglevel fatal"
IF "%~1"=="-d" (
REM @ECHO ON
SET "ffdebug=-loglevel debug"
SET "ffshowb=%"
MODE CON:COLS=140 LINES=250
COLOR 07
ECHO __________________________________________________________________
ECHO DEBUG INFO
ECHO __________________________________________________________________
)
:START
ECHO[
ECHO ______________________________________________________
ECHO This will pull a screenshot from your Nexus 5 and
ECHO save it to the directory that you ran this bat
ECHO file in. Connect USB ^& reboot into your recovery.
ECHO ______________________________________________________
ECHO Thanks to Whiskey103 for the idea!!
ECHO Written by makers_mark
ECHO ______________________________________________________
IF NOT EXIST ffmpeg.exe GOTO NOFILES
IF NOT EXIST adb.exe GOTO NOFILES
ADB kill-server -d >nul 2>&1
IF %TS%=="NOGOOD" GOTO SKIPPEDthatPause
ECHO Press any key when you are ready.
PAUSE >nul
:SKIPPEDthatPause
ECHO[
ECHO Pulling framebuffer from /dev/graphics/fb0
adb pull /dev/graphics/fb0 frmbfr >nul
IF ERRORLEVEL 1 (cls
SET TS="NOGOOD"
ECHO ______________________________________________________
ECHO Adb is not properly connected.
ECHO Try "Safely Removing" your N5 from your computer
ECHO Then unplug your usb cable, and reinsert it.
ECHO ______________________________________________________
ECHO[
ECHO[
ECHO Press any key to try again.
ECHO[
ECHO[
PAUSE >nul
CLS
GOTO START
)
SET TS=%DATE:/=%_%TIME::=_%
SET TS=%TS:.=%
SET TS=%TS: =%.png
FFMPEG %ffdebug% %ffshowb% -f rawvideo -vcodec rawvideo -pix_fmt rgb0 -s 1088x1920 -i frmbfr -vf crop=1080:1920:0:0 -y %TS%
IF NOT EXIST %TS% GOTO ERRNE
DEL frmbfr >nul
ECHO ______________________________________________________
ECHO Screenshot saved as %TS%
ECHO ______________________________________________________
ECHO Press 1 or 2
ECHO 1 - Save another screenshot
ECHO 2 - Exit
ECHO ______________________________________________________
CHOICE /C:12 >nul
IF ERRORLEVEL 1 SET K=1
IF ERRORLEVEL 2 SET K=2
IF %K%==1 GOTO SKIPPEDthatPause
IF %K%==2 GOTO FINISH
:NOFILES
CLS
ECHO The directory that you are running this script in is:
ECHO %~dp0
ECHO[
ECHO You must run this script in the same directory as
ECHO adb.exe and ffmpeg.exe. Press any key to exit
PAUSE >nul
EXIT
:ERRNE
CLS
MODE CON:COLS=108 LINES=200
COLOR 07
FFMPEG -loglevel debug -f rawvideo -vcodec rawvideo -pix_fmt rgb0 -s 1088x1920 -i frmbfr -vf crop=1080:1920:0:0 -y %TS%
ECHO ____________________________________________________________________________________________________________
ECHO There was a problem converting the framebuffer to a png file.
ECHO[
ECHO To capture the screen of the cmd window, hold down the alt key and press PrtSc on your keyboard. This
ECHO will save an image of the current window in memory on your clipboard. Then open paint or photoshop or
ECHO whatever program you use and hit ctrl+N to open a new file, then ctrl+V to paste an image. Save it and
ECHO please message me it or post in the XDA forum thread.
ECHO[
ECHO[
ECHO If you got to this screen and are not using a Nexus 5, congratulations for successfully pulling the
ECHO framebuffer. To figure out the resolution to use, try adding 4,8,16, or 32 to your native width to make
ECHO room for the extra data, ioctrls?, at the end of each pixel row. Experiment with different pixel formats
ECHO also.
ECHO[
ECHO To see a list of all of the pix_fmts supported by ffmpeg, run ffmpeg -pix_fmts
ECHO[
ECHO Press 1 or 2
ECHO 1 - Show available pixel formats
ECHO 2 - Exit
CHOICE /C:12
IF ERRORLEVEL 1 SET K=1
IF ERRORLEVEL 2 SET K=2
IF %K%==1 (cls
MODE CON:COLS=52 LINES=200
ffmpeg -hide_banner -pix_fmts
pause
GOTO FINISH)
IF %K%==2 GOTO FINISH
:FINISH
ADB kill-server -d
EXIT
Great! It worked!
I've just test it on my Nexus5.
Thanks!
Thanks! but seems like the color isn't correct and it content 4 screenshot in a single png file.
weihan1102 said:
Thanks! but seems like the color isn't correct and it content 4 screenshot in a single png file.
Click to expand...
Click to collapse
It looks like the multirom twrp uses a different kernel.
Can you do me a favor and substitute '-pix_fmt rgb0' with '-pix_fmt rgba' in the batch file?
To edit the batch file just right click it and choose edit. Find the lines, there's two of them, that start with ffmpeg..... and replace the part above. Save it and try again.
makers_mark said:
It looks like the multirom twrp uses a different kernel.
Can you do me a favor and substitute '-pix_fmt rgb0' with '-pix_fmt rgba' in the batch file?
To edit the batch file just right click it and choose edit. Find the lines, there's two of them, that start with ffmpeg..... and replace the part above. Save it and try again.
Click to expand...
Click to collapse
No, the color change but still not the correct color
weihan1102 said:
No, the color change but still not the correct color
Click to expand...
Click to collapse
Can you change the pix_fmt to bgra? I could figure it out later if you could upload your framebuffer file later, I won't be able to be around a computer for about 11 or 12 hours from now.
To save the framebuffer to your computer : shift + right click on the folder adb and other files are in, and select run cmd here. In the command window type 'adb pull /dev/graphics/fb0 rawfb0.raw'. The file rawfb0.raw will be in that same folder now.
makers_mark said:
Can you change the pix_fmt to bgra? I could figure it out later if you could upload your framebuffer file later, I won't be able to be around a computer for about 11 or 12 hours from now.
To save the framebuffer to your computer : shift + right click on the folder adb and other files are in, and select run cmd here. In the command window type 'adb pull /dev/graphics/fb0 rawfb0.raw'. The file rawfb0.raw will be in that same folder now.
Click to expand...
Click to collapse
bgra didn't work.
and the rawfb0.raw, here you are
https://drive.google.com/file/d/0B5FN-6JxBhASempFLTFUSDlkX3c/edit?usp=sharing
weihan1102 said:
bgra didn't work.
and the rawfb0.raw, here you are
https://drive.google.com/file/d/0B5FN-6JxBhASempFLTFUSDlkX3c/edit?usp=sharing
Click to expand...
Click to collapse
Thank you so much! I will fix it when I get home.

[TOOL][MOD][WIN][SHARE] Take Screenshots in Recovery & Aroma!

[SIZE="4']Note : I'm just sharing the work of the XDA Member.Here's a little introduction by him :[/B][/U][/SIZE]
[QUOTE="makers_mark, post: 0"]This is a tool to capture screenshots while in Recovery or the Aroma Installer.
One big problem people are having when trying to capture screenshots in recovery is the extra framebuffer info that is tacked on to the end of each pixel row. Through a lot of digging and not finding too much information on it, I've finally found a way to determine what dimensions to use for, I believe, all android devices.
Fb2png is a great program, but unfortunately it only works with framebuffers that don't have a stride. FFmpeg is what I use here. That is a major problem with fb2png but it seems like it would be an easy thing to fix. The only thing to get it working, besides some random pixel formats maybe, is taking care of this stride.
I found that if you divide your width, for the nexus 7 2013 it's 1200, by 32, your stride will equal the value to add to 1200 to go up and make it evenly divisible by 32, that is your stride. Look at a bunch of resolutions and the width; the short side, think portrait mode; is usually evenly divisible by 32. Not all the time though, like the case of the Nexus 7 2013, Nexus 5 with 1080, and many more devices nowadays, AND those are the devices fb2png gives distorted screenshots with. Maybe @Phil3759 knows how to fix this for fb2png.
By the way the Nexus 5's stride is 8
1080/32 = 33 with a remainder of 24. 32-24 = 8
Anyways I made this batch script that takes into account your stride, if you have one. If your width is 768 for example, you won't have one because 32 goes into 768 an even 24 times.
Instructions:
Download the RS_all.rar file
Extract it to a new folder.
You will have the programs FFmpeg & ADB. Two .dll files for ADB. And the batch script RUNrs.bat
I assume you have your ADB drivers squared away.
Reboot into your recovery.
Run RUNrs.bat and it will ask you for you screen width in pixels, and your height. Input them.
It will then pull your framebuffer and make a bunch of viewable pngs with different pixel formats.
Don't close the program or anything, but go look in the folder you unzipped everything, and go through the images until you find one that is exactly like you screen, don't settle for close. Look at the filename of the one, and input that into the next prompt for your pixel format.
If I get any feedback I will change the first set of pixel formats to more common ones only, then some rarer ones if the first set didn't work.
Feel free to run 'ffmpeg -pix_fmts' and put in any of the other input-able pixel formats when you are asked to select which one you want to use.
Your set from there, all of that will be saved into settings.cfg.
If you change your recovery, you may have to clear the settings. You can do so easily in the program, or you can just delete settings.cfg
Same thing if you try a different device.
I am severely limited in devices to test. But I'd like to find a universal way with all android devices to pull the screen resolution from the phone/tablet and..
- add a check for the framebuffer in /dev/fb0 instead of just /dev/graphics/fb0. For now, if you get errors and it won't pull the framebuffer. Just change the code in the batch, two different places, from 'adb pull /dev/graphics/fb0 frmbfr' to 'adb pull /dev/fb0 frmbfr'
- make folders for screenshots to go into, and also a temp folder that gets deleted, for the pixel format test images.
- add the double frame buffer, two images. I have already done it, but am a little baffled as some devices seem to have six; or at least room for six raw fb0 NUL 2>&1
ADB pull /dev/graphics/fb0 frmbfr > nul
IF ERRORLEVEL 1 (cls
SET TS="NOGOOD"
ECHO ______________________________________________________
ECHO Adb is not properly connected.
ECHO Try "Safely Removing" your device from your computer
ECHO Then unplug your usb cable, and reinsert it.
ECHO ______________________________________________________
ECHO[
ECHO[
ECHO Press any key to try again.
ECHO[
ECHO[
PAUSE >nul
CLS
GOTO SETTINGS
)
CLS
REM ECHO The width of your framebuffer is %widthwithstride%
SET line=
ECHO %widthwithstride% > temp.tmp
FOR /F "delims=" %%A IN (temp.tmp) DO SET line=%%A
ECHO %width% > temp.tmp
FOR /F "delims=" %%A IN (temp.tmp) DO SET line=%line% %%A
ECHO %height% > temp.tmp
FOR /F "delims=" %%A IN (temp.tmp) DO SET line=%line% %%A
REM echo %width% %height% %stride% %widthwithstride%
REM echo %framebufferpixels% %bytespp%
REM echo %fb0size%
SET TS=%_%.png
FOR /D %%A IN (%pixfmt%) DO call FFMPEG %ffshowb% %ffdebug% -f rawvideo -vcodec rawvideo -pix_fmt %%A -s %widthwithstride%x%height% -i frmbfr -vframes 1 -vf crop=%width%:%height%:0:0 -y %%A%TS%
ECHO Check in the folder you ran this program in and there
ECHO should be several images. If any are a 'correct'
ECHO screenshot, make a note of what pixel format is in
ECHO the start of the filename.
ECHO[
ECHO YOU MUST USE LOWERCASE LETTERS!
ECHO[
ECHO Example: file that is correct color is rgb565.png
ECHO then you would enter 'rgb565'
SET /p pixfmt=Pixel format?
REM IF %pixfmt%=none GOTO SORRY
ECHO %pixfmt% > temp.tmp
FOR /F "delims=" %%A IN (temp.tmp) DO SET line=%line% %%A
ECHO %line% > settings.cfg
DEL frmbfr
DEL temp.tmp
CLS
GOTO START
:FINISH
ADB kill-server -d
SET width=""
SET height=""
SET widthwithstride=""
SET framebufferpixels=""
SET bytespp=""
SET fb0size=""
SET TS=""
EXIT
ROCESS
SET widthwithstride=%1
SET width=%2
SET height=%3
SET pixfmt=%4
GOTO GOTPARAMETERS
:SORRY
REM SLIM DOWN ORIGIANL PIXEL FORMATS, AND SOME RARER ONES HERE
GOTO FINISH
[/CODE][/HIDE]
[/QUOTE]
Original Thread : http://forum.xda-developers.com/showthread.php?t=2635736

I need help. [SOLVED]

I am making a big programme to unpack or repack boot image. I made a batch file but its giving error when I enter my choice
Batch code is removed: but no problem in it
Code:::::
color 02
cls
@ECHO off
:start
cls
echo ================================================
echo == TOOL MADE BY MZ_. ==
echo == Credits: Me for creating tool ==
echo ================================================
echo.
echo.
echo.
echo 1) Extract Boot IMAGE
echo.
echo 2) Repack Boot IMAGE
echo.
echo 3) View on XDA
echo.
echo 4) End program
echo.
set /p ch=Enter a choice in numbers:
if no '%ch%'==set ch=%ch%:~0,1%
if '%ch%'=='1' goto extract
if '%ch%'=='2' goto repack
if '%ch%'=='3' goto xda
if '%ch%'=='4' goto end
echo Please chose a valid option, '%ch%' isn't valid!
echo.
pause
goto start
:extract
@ECHO TOOL MADE BY HAMZA
@ECHO www.facebook.com/MZ11200
@ECHO [email protected]
@ECHO _____________________________________
goto start
:repack
@ECHO Deleted code...
goto start
:xda
start http://forum.xda-developers.com/android/software/tool-kernel-spilitter-t3058786/post59543250
goto start
:end
end
On running I'm getting %ch% was unexpected at this time
Hit THANKS if I help, or you like my post!
Edit: I found the problem, I had to delete if no '%ch%'==set ch=%ch%:~0,1% line... Now it is working and it is a nice tool to split a kernel into its parts

How to flash multiple zip files via ADB Sideload?

Hey guys, as per the title, I'm trying to flash multiple zip files via ADB. I am tasked with a project of flashing nearly 100 devices over the next week or so, and my standard method of imaging is a bit thwarted since i need to flash a firmware and ROM package on these Xiaomi Redmi Note 5s before I flash my custom ROM to it. When I run adb sideload and flash a zip, it will close adb sideload. I then need to unlock the device, and re-enable ADB sideload again.
Is there any way of stacking zips in adb sideload? I don''t see any arguments that would enable this. Alternatively, is there a standar ADB command to enable sideload in TWRP? I couldn't find any information on this either. Advice would be appreciated
Hello,
I have the same problem, did you find a solution ?
adb sideload zip1.zip zip2.zip does not work for me
lapwat said:
Hello,
I have the same problem, did you find a solution ?
adb sideload zip1.zip zip2.zip does not work for me
Click to expand...
Click to collapse
Why not make use of a Windows CMD script to perform a mass-sideload of ZIPs?
Example
Code:
@echo off & setlocal
set "zip_files_repository=C:\ZIP-FILES-REPOSITORY"
echo Sideloading ZIPs contained in %zip_files_repository% ...
for /F "skip=1" "tokens=*" %%t in ('adb devices 2^>nul') do ( set "mode=%%t" )
if not "?%mode%"=="?" (
echo %mode% | findstr /C:"device" >nul
if %errorlevel% neq 0 ( goto :done_sideload )
) else (
goto :done_sideload
)
for /F %%a in ('dir %zip_files_repository% /B') do (
set "zip_file=%%a"
if "?%zip_file%"=="?" ( goto :done_sideload )
set "zip_file=%zip_files_repository%\%zip_file%"
adb reboot sideload
timeout /t 5 /nobreak >nul
for /F "skip=1" "tokens=*" %%t in ('adb devices 2^>nul') do ( set "mode=%%t" )
if not "?%mode%"=="?" (
echo %mode% | findstr /C:"sideload" >nul
if %errorlevel% equ 0 (
adb sideload %zip_file%
) else (
goto :done_sideload
)
)
)
:done_sideload
echo Job done.
timeout /t 10 /nobreak >nul
endlocal & @echo on & exit

Categories

Resources