(TOOL) ADB & FASTBOOT SAUCE V1.2 - all in one [many options] SCREENSHOTS - Android Software/Hacking General [Developers Only]

ADB & FASTBOOT SAUCE V1.2
*YOUR WARRANTY IS ALREADY VOIDED*
*I AM NOT RESPONSIBLE FOR BRICKED DEVICES OR ANY OTHER DAMAGE*
* PLEASE USE THE README*
* YOU ARE THE ONE PRESSING THE BUTTONS SO DON'T BLAME ME*​
This is for most devices and mainly for devices that are unlocked. This is also for most devices that use fastboot. This can be used with many devices as well. I have only tested on a few
It is a menu based batch file that combines many things from around this thread. It is also pretty self explanatory.
Update V1.2 FIXED Directory Issues Caused By Update v1.1 That I Missed
Update V1.1 added cmd prompt options for fastboot and adb. Also added fastboot oem unlock option.
README:
ALL THE CREDITS ARE LISTED BELOW, IF I MISSED ANY LET ME KNOW!
PLEASE READ EVERYTHING IN HERE AND ASK QUESTIONS IF THERE ARE ANY.
THE TWRP BACKUP AND RESTORE TOOL LOCATED AT OPTION 4 IS STILL
EXPERIMENTAL AND MIGHT NOT WORK. DO NOT RELY ON IT AS OF YET!
THIS IS TO BE RAN FROM RECOVERY, AS FROM ANDROID IS NOT WORKING
FOR ME. IT WILL PUSH THE BACKUPS FROM YOUR CHOICE AT THE MENU
TO THE SAME FOLDER AS THIS SCRIPT FILE IS LOCATED.
FOR THE RESTORE OPTION IT SEEMS TO HANG BUT ON TWRP IT SHOWS IT
COMPLETING. A CNTRL+C AFTER RESTORE COMPLETE SHOWS UP WILL
TERMINATE BATCH JOB AND PRESSING N WILL BRING YOU BACK TO THE MENU.
For Option 11 FASTBOOT FLASH RECOVERY You Can Substitute Any
Custom Recovery, But You Would Have To Rename It To twrp.img
As This Script Is Looking For That Particular Naming Convention.
This Is For Devices That Use Fastboot Only!
For Option 25 ADB SHELL After Your Done Using The Shell You
Can Type exit And It Will Allow You To Go Back To The Menu!
For Option 32 ADB SD-CARD INCREMENTAL BACKUP There Is An
ignore-list.ini File That Has Instructions To Ignore Specific
Folders To Not Sync. This Is Best Ran In Recovery Via ADB IMO.
ADB SD-CARD INCREMENTAL BACKUP Description
This Backs Up The Entire SDcard So That You Can Have A
Complete Snapshot Of Your Device When You Make Periodic
Backups, And Be Able To Restore Things Exactly As They Were.
CREDITS:
TWRP Backup And Restore Tool:
http://forum.xda-developers.com/showpost.php?p=71406861
Fb2Png:
https://github.com/PhilZ-cwm6/philz_touch_cwm6/tree/cm-11.0/fb2png
ADBSync:
http://forum.xda-developers.com/showthread.php?t=2133312
Cut, Grep, RM:
http://unxutils.sourceforge.net/
Zip:
http://forum.xda-developers.com/showthread.php?t=1207017
Batch Scripts For ADB Screenshot & SDcard Backup
[email protected] & A Little By Me!
https://forum.xda-developers.com/showthread.php?t=2239421
ADB and Fastboot Files:
..................................................................................................................................................................................................................
Copyright 2012 The Android Open Source Project.....................................................................................
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.........................................................................................................................................
...................................................................................................................................................................................................................
Android Screenshooter (fb2png) by Kyan He [email protected]
Maintained by Phil3759 & McKael @ xda-developers
TWRP Backup And Restore Tool v1.1 by dexbyte www.dexteroid.com
ADB Screenshot For Recovery By osm0sis @ xda-developers & A Little By Me!
https://forum.xda-developers.com/showthread.php?t=2239421
ADB Sync Utility Copyright (c) Temblast 2012-2014
By Renate NST @ xda-developers
SDcard Backup Automation By osm0sis @ xda-developers & A Little By Me!
https://forum.xda-developers.com/showthread.php?t=2239421
Secondary Download : Will add once thoroughly tested.

Version Info
Update V1.2 FIXED Directory Issues Caused By Update v1.1 That I Missed
Update V1.1 added cmd prompt options for fastboot and adb. Also added fastboot oem unlock option.

bryantjopplin said:
Version Info
Update V1.2 FIXED Directory Issues Caused By Update v1.1 That I Missed
Update V1.1 added cmd prompt options for fastboot and adb. Also added fastboot oem unlock option.
Click to expand...
Click to collapse
Nice work! Automation saves lives :angel:.

kirito9 said:
Nice work! Automation saves lives :angel:.
Click to expand...
Click to collapse
Have you used it? I am adding fastboot oem lock and fastboot flashing unlock / lock. There is an added MoaAB ADBlocker getting worked in as of now and last night I completed to sd card restore option. Still working on zip aligning apks and optimizing ogg's.

bryantjopplin said:
Have you used it? I am adding fastboot oem lock and fastboot flashing unlock / lock. There is an added MoaAB ADBlocker getting worked in as of now and last night I completed to sd card restore option. Still working on zip aligning apks and optimizing ogg's.
Click to expand...
Click to collapse
Haven't used it as yet, was on Linux. Hoping for a Linux version soon.

kirito9 said:
Haven't used it as yet, was on Linux. Hoping for a Linux version soon.
Click to expand...
Click to collapse
Well I might have to let someone else do that haha, I really have been reading and learning as I go, not sure how hard it is to turn into a sh. I started out doing something for the s4 to flash Loki bootloaders that I got lucky on making them with Loki patch, then went on to the HP touchpad and make some custom things for it. Then at work I made some enhancements for our CCTV software and used the same format as the others. That's when this started as I seen everything separated and not as one throughout the web, so I just added as I found interesting things. Some of my own design and code but a lot help from others. Just trial and error until it worked across all my devices.
Sent from my Pixel XL using Tapatalk

bryantjopplin said:
Well I might have to let someone else do that haha, I really have been reading and learning as I go, not sure how hard it is to turn into a sh. I started out doing something for the s4 to flash Loki bootloaders that I got lucky on making them with Loki patch, then went on to the HP touchpad and make some custom things for it. Then at work I made some enhancements for our CCTV software and used the same format as the others. That's when this started as I seen everything separated and not as one throughout the web, so I just added as I found interesting things. Some of my own design and code but a lot help from others. Just trial and error until it worked across all my devices.
Click to expand...
Click to collapse
That's cool as I have a dual boot setup. That's generally how those big tools begin, a side project leading to greater things.
---------- Post added at 05:29 PM ---------- Previous post was at 05:09 PM ----------
bryantjopplin said:
Well I might have to let someone else do that haha, I really have been reading and learning as I go, not sure how hard it is to turn into a sh. I started out doing something for the s4 to flash Loki bootloaders that I got lucky on making them with Loki patch, then went on to the HP touchpad and make some custom things for it. Then at work I made some enhancements for our CCTV software and used the same format as the others. That's when this started as I seen everything separated and not as one throughout the web, so I just added as I found interesting things. Some of my own design and code but a lot help from others. Just trial and error until it worked across all my devices.
Sent from my Pixel XL using Tapatalk
Click to expand...
Click to collapse
Check this out when you have time. Really good stuff.

kirito9 said:
That's cool as I have a dual boot setup. That's generally how those big tools begin, a side project leading to greater things.
---------- Post added at 05:29 PM ---------- Previous post was at 05:09 PM ----------
Check this out when you have time. Really good stuff.
Click to expand...
Click to collapse
That's pretty sweet, I think I got my zipalign working finally, omg I'm in over my head haha.
Sent from my Pixel XL using Tapatalk

You wouldn't happen to be able and tell me if you see anything wrong with this code so far? Man this one is a pain. lol
Code:
:ZIPALIGNAPK
CLS
ECHO.
ECHO Before You Start Make Sure Your Device Has USB Debugging Enabled!
ECHO.
ECHO Presented By: B-RAD
ECHO FOR ADB ^& FASTBOOT ONLY
ECHO CHOOSE BELOW
ECHO __________________________________________________________________
ECHO 41 - /system/app VIA ADB
ECHO.
ECHO 42 - /system/priv-app VIA ADB
ECHO.
ECHO 43 - /data/app VIA ADB
ECHO.
ECHO 44 - OPTIMIZE ALL APKS VIA ADB
ECHO.
ECHO 99 - OPTIMIZATION MAIN MENU
ECHO.
ECHO.
set /p M=Type Your Choice Then Press ENTER:
ECHO.
ECHO.
IF %M% == 41 (
ECHO.
CD /d "%~dp0FILES"
CLS
ECHO.
ECHO ZIPALIGNING APK'S FROM '\system\app'
ECHO.
ECHO PULLING APK'S
IF exist TEMP rd /Q /S TEMP
mkdir TEMP
adb start-server
adb pull /system/app TEMP
del /Q /S *.so
call :subzipalign
ECHO PUSHING APK'S
adb remount
adb push TEMP /system/app
ECHO CLEANING UP LOCAL TEMP FILES
rd /Q /S TEMP
ECHO.
ECHO ZIPALIGN COMPLETE
ECHO.
Pause
goto zipalignapk
)
IF %M% == 42 (
ECHO.
CD /d "%~dp0FILES"
CLS
ECHO.
ECHO ZIPALIGNING APK'S FROM '\system\priv-app'
ECHO.
ECHO PULLING APK'S
IF exist TEMP rd /Q /S TEMP
mkdir TEMP
adb start-server
adb pull /system/priv-app TEMP
del /Q /S *.so
call :subzipalign
ECHO PUSHING APK'S
adb remount
adb push TEMP\priv-app /system/
pause
ECHO CLEANING UP LOCAL TEMP FILES
rd /Q /S TEMP
ECHO.
ECHO ZIPALIGN COMPLETE
ECHO.
Pause
goto ZIPALIGNAPK
)
IF %M% == 43 (
ECHO.
CD /d "%~dp0FILES"
CLS
ECHO.
ECHO ZIPALIGNING APK'S FROM '\data\app'
ECHO.
ECHO PULLING APK'S
IF exist TEMP rd /Q /S TEMP
mkdir TEMP
adb start-server
adb pull /data/app TEMP
del /Q /S *.so
del /Q /S *.odex
call :subzipalign
ECHO PUSHING APK'S
adb remount
adb push TEMP\app\ /data/
pause
ECHO CLEANING UP LOCAL TEMP FILES
rd /Q /S TEMP
ECHO.
ECHO ZIPALIGN COMPLETE
ECHO.
CD /d "%~dp0"
Pause
goto zipalignapk
)
IF %M% == 44 (
ECHO.
CD /d "%~dp0FILES"
CLS
ECHO.
ECHO PREPARING FOR ZIPALIGN OF ALL APK'S
ECHO.
ECHO ZIPALIGNING ALL APK'S FROM '\system\app'
ECHO.
ECHO PULLINGS APKs...
IF exist TEMP rd /Q /S TEMP
mkdir TEMP
adb start-server >nul 2>&1
adb pull /system/app TEMP >nul 2>&1
del /Q /S *.so >nul 2>&1
call :subzipalign
ECHO PUSHING APK'S
adb remount >nul 2>&1
adb push TEMP /system/app >nul 2>&1
ECHO CLEANING UP LOCAL TEMP FILES
rd /Q /S TEMP >nul 2>&1
ECHO.
ECHO.
ECHO ZIPALIGNING ALL APK'S FROM '\system\priv-app'
ECHO.
ECHO PULLING APK'S
IF exist TEMP rd /Q /S TEMP
mkdir TEMP
adb start-server >nul 2>&1
adb pull /system/priv-app TEMP >nul 2>&1
del /Q /S *.so >nul 2>&1
call :subzipalign
ECHO PUSHING APK'S
adb remount >nul 2>&1
adb push TEMP\priv-app /system/ >nul 2>&1
ECHO CLEANING UP LOCAL TEMP FILES
rd /Q /S TEMP >nul 2>&1
ECHO.
ECHO.
ECHO ZIPALIGNING ALL APK'S FROM '\data\app'
ECHO.
ECHO PULLING APK'S
IF exist TEMP rd /Q /S TEMP
mkdir TEMP
adb start-server >nul 2>&1
adb pull /data/app TEMP >nul 2>&1
del /Q /S *.so >nul 2>&1
del /Q /S *.odex >nul 2>&1
call :subzipalign
ECHO PUSHING APK'S
adb remount >nul 2>&1
adb push TEMP\app\ /data/ >nul 2>&1
ECHO CLEANING UP LOCAL TEMP FILES
rd /Q /S TEMP >nul 2>&1
ECHO.
ECHO ZIPALIGN COMPLETE
ECHO.
CD /d "%~dp0"
Pause
goto zipalignapk
)
IF %M% == 99 goto M6MENU
:subzipalign
@echo off
@echo Zip aligning now...
for /R %%X in (*.apk) do zipalign 4 "%%X" "%%~dpX%%~nX.new"
@echo Replacing non-aligned files with zip aligned files...
for /R %%X in (*.new) do move /Y "%%X" "%%~dpX%%~nX.apk"
@echo Zip aligning done, press any key to exit
pause
Goto :eof
kirito9 said:
That's cool as I have a dual boot setup. That's generally how those big tools begin, a side project leading to greater things.
---------- Post added at 05:29 PM ---------- Previous post was at 05:09 PM ----------
Check this out when you have time. Really good stuff.
Click to expand...
Click to collapse

bryantjopplin said:
You wouldn't happen to be able and tell me if you see anything wrong with this code so far? Man this one is a pain. lol
Click to expand...
Click to collapse
Lol, I'm sorry if I gave the impression that I know bash :"). I don't, I did but I didn't get into the advanced stuff. Maybe @Ricky Divjakovski can help.

kirito9 said:
Lol, I'm sorry if I gave the impression that I know bash :"). I don't, I did but I didn't get into the advanced stuff. Maybe @Ricky Divjakovski can help.
Click to expand...
Click to collapse
The /data/app seems to do fine, still testing on a new flash haha. I guess trial and error will tell. Thanks though!

bryantjopplin said:
The /data/app seems to do fine, still testing on a new flash haha. I guess trial and error will tell. Thanks though!
Click to expand...
Click to collapse
Good luck .

kirito9 said:
Good luck .
Click to expand...
Click to collapse
Shows to be good. Haha now for a reboot.

bryantjopplin said:
You wouldn't happen to be able and tell me if you see anything wrong with this code so far? Man this one is a pain. lol
Code:
:ZIPALIGNAPK
CLS
ECHO.
ECHO Before You Start Make Sure Your Device Has USB Debugging Enabled!
ECHO.
ECHO Presented By: B-RAD
ECHO FOR ADB ^& FASTBOOT ONLY
ECHO CHOOSE BELOW
ECHO __________________________________________________________________
ECHO 41 - /system/app VIA ADB
ECHO.
ECHO 42 - /system/priv-app VIA ADB
ECHO.
ECHO 43 - /data/app VIA ADB
ECHO.
ECHO 44 - OPTIMIZE ALL APKS VIA ADB
ECHO.
ECHO 99 - OPTIMIZATION MAIN MENU
ECHO.
ECHO.
set /p M=Type Your Choice Then Press ENTER:
ECHO.
ECHO.
IF %M% == 41 (
ECHO.
CD /d "%~dp0FILES"
CLS
ECHO.
ECHO ZIPALIGNING APK'S FROM '\system\app'
ECHO.
ECHO PULLING APK'S
IF exist TEMP rd /Q /S TEMP
mkdir TEMP
adb start-server
adb pull /system/app TEMP
del /Q /S *.so
call :subzipalign
ECHO PUSHING APK'S
adb remount
adb push TEMP /system/app
ECHO CLEANING UP LOCAL TEMP FILES
rd /Q /S TEMP
ECHO.
ECHO ZIPALIGN COMPLETE
ECHO.
Pause
goto zipalignapk
)
IF %M% == 42 (
ECHO.
CD /d "%~dp0FILES"
CLS
ECHO.
ECHO ZIPALIGNING APK'S FROM '\system\priv-app'
ECHO.
ECHO PULLING APK'S
IF exist TEMP rd /Q /S TEMP
mkdir TEMP
adb start-server
adb pull /system/priv-app TEMP
del /Q /S *.so
call :subzipalign
ECHO PUSHING APK'S
adb remount
adb push TEMP\priv-app /system/
pause
ECHO CLEANING UP LOCAL TEMP FILES
rd /Q /S TEMP
ECHO.
ECHO ZIPALIGN COMPLETE
ECHO.
Pause
goto ZIPALIGNAPK
)
IF %M% == 43 (
ECHO.
CD /d "%~dp0FILES"
CLS
ECHO.
ECHO ZIPALIGNING APK'S FROM '\data\app'
ECHO.
ECHO PULLING APK'S
IF exist TEMP rd /Q /S TEMP
mkdir TEMP
adb start-server
adb pull /data/app TEMP
del /Q /S *.so
del /Q /S *.odex
call :subzipalign
ECHO PUSHING APK'S
adb remount
adb push TEMP\app\ /data/
pause
ECHO CLEANING UP LOCAL TEMP FILES
rd /Q /S TEMP
ECHO.
ECHO ZIPALIGN COMPLETE
ECHO.
CD /d "%~dp0"
Pause
goto zipalignapk
)
IF %M% == 44 (
ECHO.
CD /d "%~dp0FILES"
CLS
ECHO.
ECHO PREPARING FOR ZIPALIGN OF ALL APK'S
ECHO.
ECHO ZIPALIGNING ALL APK'S FROM '\system\app'
ECHO.
ECHO PULLINGS APKs...
IF exist TEMP rd /Q /S TEMP
mkdir TEMP
adb start-server >nul 2>&1
adb pull /system/app TEMP >nul 2>&1
del /Q /S *.so >nul 2>&1
call :subzipalign
ECHO PUSHING APK'S
adb remount >nul 2>&1
adb push TEMP /system/app >nul 2>&1
ECHO CLEANING UP LOCAL TEMP FILES
rd /Q /S TEMP >nul 2>&1
ECHO.
ECHO.
ECHO ZIPALIGNING ALL APK'S FROM '\system\priv-app'
ECHO.
ECHO PULLING APK'S
IF exist TEMP rd /Q /S TEMP
mkdir TEMP
adb start-server >nul 2>&1
adb pull /system/priv-app TEMP >nul 2>&1
del /Q /S *.so >nul 2>&1
call :subzipalign
ECHO PUSHING APK'S
adb remount >nul 2>&1
adb push TEMP\priv-app /system/ >nul 2>&1
ECHO CLEANING UP LOCAL TEMP FILES
rd /Q /S TEMP >nul 2>&1
ECHO.
ECHO.
ECHO ZIPALIGNING ALL APK'S FROM '\data\app'
ECHO.
ECHO PULLING APK'S
IF exist TEMP rd /Q /S TEMP
mkdir TEMP
adb start-server >nul 2>&1
adb pull /data/app TEMP >nul 2>&1
del /Q /S *.so >nul 2>&1
del /Q /S *.odex >nul 2>&1
call :subzipalign
ECHO PUSHING APK'S
adb remount >nul 2>&1
adb push TEMP\app\ /data/ >nul 2>&1
ECHO CLEANING UP LOCAL TEMP FILES
rd /Q /S TEMP >nul 2>&1
ECHO.
ECHO ZIPALIGN COMPLETE
ECHO.
CD /d "%~dp0"
Pause
goto zipalignapk
)
IF %M% == 99 goto M6MENU
:subzipalign
@echo off
@echo Zip aligning now...
for /R %%X in (*.apk) do zipalign 4 "%%X" "%%~dpX%%~nX.new"
@echo Replacing non-aligned files with zip aligned files...
for /R %%X in (*.new) do move /Y "%%X" "%%~dpX%%~nX.apk"
@echo Zip aligning done, press any key to exit
pause
Goto :eof
Click to expand...
Click to collapse
best option would be trial and error and fix bugs, also clear the dalvik cache after pushing, just a cleaner more stable way of doing things
doesnt look like anything is wrong, but just had a quick flick through so i could be wrong

DONE? HAHA
Code:
ECHO CLEARING DALVIK CACHE
ECHO PRESS ENTER TO CLEAR
PAUSE >nul 2>&1
adb shell rm -r /data/dalvik-cache > nul 2>&1
adb shell rm -r /cache/dalvik-cache > nul 2>&1
Ricky Divjakovski said:
best option would be trial and error and fix bugs, also clear the dalvik cache after pushing, just a cleaner more stable way of doing things
doesnt look like anything is wrong, but just had a quick flick through so i could be wrong
Click to expand...
Click to collapse

Ricky Divjakovski said:
best option would be trial and error and fix bugs, also clear the dalvik cache after pushing, just a cleaner more stable way of doing things
doesnt look like anything is wrong, but just had a quick flick through so i could be wrong
Click to expand...
Click to collapse
You wouldn't happen to know the proper mount point for system via adb in recovery? I tried using adb shell mount -o rm,remount /system and it doesn't work, but adb shell mount -a does but its just all mount points not /system?

bryantjopplin said:
You wouldn't happen to know the proper mount point for system via adb in recovery? I tried using adb shell mount -o rm,remount /system and it doesn't work, but adb shell mount -a does but its just all mount points not /system?
Click to expand...
Click to collapse
check architecture then push correct busybox to /data/tmp, apply correct permissions and mount with busybox

Sounds like to much work haha, I'll just tell them to reboot recovery before doing anything else or just go to mount and deselect system haha
Sent from my Pixel XL using Tapatalk

Hey, I appreciate the mentions since you're using a few of my works. Could you please also throw a link in your OP to my Odds and Ends thread, where they originated, as you did for the other components?

osm0sis said:
Hey, I appreciate the mentions since you're using a few of my works. Could you please also throw a link in your OP to my Odds and Ends thread, where they originated, as you did for the other components?
Click to expand...
Click to collapse
Uodated!! I actually thought I did, Sorry. And thanks for reminding me, I'll need to update it again for the zip align idea.
Also any other cool things that I can play with in adb?
Thanks and sorry
Sent from my Pixel XL using Tapatalk

Related

[Q] Optimus 3D will not turn over - Clockwork recovery touch

Hi,
I try to install the touch clock recovery but my smart not turn on any more.
I execute this 2 codes
Code:
@echo off
title CWM Recovery Touch 5.8.1.5 for P920
color 0A
echo.
echo --[ Flash process started ]--
echo.
echo.
echo Reseting server
echo ---------------
echo.
adb\adb.exe kill-server
adb\adb.exe start-server
echo.
echo.
echo Waiting for device
echo ------------------
echo.
adb\adb.exe wait-for-device
echo.
echo.
echo Flashing
echo --------
echo.
adb\adb.exe push recovery-clockwork-touch-5.8.1.5-p920.img /data/local/tmp/
adb\adb.exe shell "su -c 'dd if=/data/local/tmp/recovery-clockwork-touch-5.8.1.5-p920.img of=/dev/block/mmcblk0p4'"
adb\adb.exe shell "rm /data/local/tmp/recovery-clockwork-touch-5.8.1.5-p920.img"
echo.
echo.
echo Killing server
echo --------------
echo.
adb\adb.exe kill-server
echo.
echo.
echo -[ Process end ]-
echo.
timeout 10
this is ok ...
Code:
@echo off
title CWM Recovery Touch 5.8.1.5 for P920
color 0A
echo.
adb\adb.exe kill-server
adb\adb.exe start-server
adb\adb.exe wait-for-device
adb\adb.exe reboot recovery
adb\adb.exe kill-server
echo.
timeout 3
in second code my smart turn off and not turn on any more. (i try to start in download mode but not work).
informations
rom: Cyanogenmod 7.2 RC
recovery: clockwork recovery (standard)
-----------
I need to go into a technical assistance?
I believe you flashed recovery to the bootloader rather than the recovery partition. mmcblk0p4 has 512 blocks according to the partition table which means that it's way too small for recovery and probably the wrong partition. Where did you read that you should flash to mmcblk0p4? You should have flashed to mmcblk0p6, not mmcblk0p4. The only thing you can do now is try to reflash it using the instructions here or here, if not you'll have to bring it for warranty service.
I tried many times but I only returned error: -1 in ADB. I found this code and I ventured (it was for the P970, only modified files).
And I can`t also put you in reflash mode (the smartphone is leaving and entering the driver).
I hope the assistance does not cover me for out of warranty.

[FIX]Facebook contact icon fix for 3rd party apps

I make no claims to be any good at this but I was searching around for a fix to the contacts not displaying in 3rd party apps issue and came across a user named erishasnobattery on teambamf.net that had come up with a solution in addition to the zerg rush temp root script and incorporated the two for the HTC rezound. So I took a look at it and figured that it could be applied to my Sensation, didn't have a usb cable at work with me so I just did it manually but I've modified the batch file that he was using to push via adb from a PC and I've attached it.
I saw when I posted this that there is an app that does it but I also saw that some people don't like installing 3rd party apps for small little issues like this so I figured I'd put it up anyways, mods can determine whether it should stay up or not.
Like I said I'm no expert and I didn't use the batch file, I modified the permissions with root explorer and downloaded the files to the appropriate directories and ran the script, rebooted the phone and bam all contact pics in handcent so it works. I did notice when I went to move the sqlite3 file to /system/xbin it was already there so I just changed the permissions on the existing file instead of overwriting with the one included.
Contents of the batch file are as follows:
:cd %:h
@echo off
echo Waiting for Device....
adb wait-for-device > NUL 2>&1
echo Pushing Files...
adb push sqlite3 /system/xbin/sqlite3 > NUL 2>&1
adb shell chmod 777 /system/xbin/sqlite3 > NUL 2>&1
adb push fix_contacts.sh /system/etc/fix_contacts.sh > NUL 2>&1
adb shell chmod 777 /system/etc/fix_contacts.sh > NUL 2>&1
adb shell /system/etc/fix_contacts.sh > NUL 2>&1
echo Fix Complete, Hit Enter to reboot.
pause
adb reboot > NUL 2>&1
contents of the fix_contacts.sh file are as follows:
#!/system/bin/sh/system/xbin/sqlite3 /data/data/com.android.providers.contacts/databases/contacts2.db "UPDATE raw_contacts SET is_restricted=0 WHERE is_restricted!=0"
You can determine for yourself if you want to use it, obviously not responsible for any problems it may cause and as always do a backup first.
Thanks,
Court
cotawa said:
I make no claims to be any good at this but I was searching around for a fix to the contacts not displaying in 3rd party apps issue and came across a user named erishasnobattery on teambamf.net that had come up with a solution in addition to the zerg rush temp root script and incorporated the two for the HTC rezound. So I took a look at it and figured that it could be applied to my Sensation, didn't have a usb cable at work with me so I just did it manually but I've modified the batch file that he was using to push via adb from a PC and I've attached it.
I saw when I posted this that there is an app that does it but I also saw that some people don't like installing 3rd party apps for small little issues like this so I figured I'd put it up anyways, mods can determine whether it should stay up or not.
Like I said I'm no expert and I didn't use the batch file, I modified the permissions with root explorer and downloaded the files to the appropriate directories and ran the script, rebooted the phone and bam all contact pics in handcent so it works. I did notice when I went to move the sqlite3 file to /system/xbin it was already there so I just changed the permissions on the existing file instead of overwriting with the one included.
Contents of the batch file are as follows:
:cd %:h
@echo off
echo Waiting for Device....
adb wait-for-device > NUL 2>&1
echo Pushing Files...
adb push sqlite3 /system/xbin/sqlite3 > NUL 2>&1
adb shell chmod 777 /system/xbin/sqlite3 > NUL 2>&1
adb push fix_contacts.sh /system/etc/fix_contacts.sh > NUL 2>&1
adb shell chmod 777 /system/etc/fix_contacts.sh > NUL 2>&1
adb shell /system/etc/fix_contacts.sh > NUL 2>&1
echo Fix Complete, Hit Enter to reboot.
pause
adb reboot > NUL 2>&1
contents of the fix_contacts.sh file are as follows:
#!/system/bin/sh/system/xbin/sqlite3 /data/data/com.android.providers.contacts/databases/contacts2.db "UPDATE raw_contacts SET is_restricted=0 WHERE is_restricted!=0"
You can determine for yourself if you want to use it, obviously not responsible for any problems it may cause and as always do a backup first.
Thanks,
Court
Click to expand...
Click to collapse
Thanks for sharing the fix, it works.
This just changes one of the attributes for the raw_contact entity, which I suppose is quite safe if you don't install untrustworthy apps.
(Any application that has been granted permission to access your contacts during install will now have access to your facebook contacts & possibly other restricted contacts too.)
If you are already running a custom ROM, then I recommend you follow these instructions:
Download Terminal Emulator from Google Play
Open Terminal Emulator
Type
Code:
su
and hit enter
Type
Code:
cp /data/data/com.android.providers.contacts/databases/contacts2.db /sdcard/contacts2.db
and hit enter
Type
Code:
/data/data/com.android.providers.contacts/databases/contacts2.db "UPDATE raw_contacts SET is_restricted=0 WHERE is_restricted!=0"
and hit enter.
Type
Code:
exit
and hit enter.
Reboot the phone.
Done. That's all you need.
You may need to repeat this everytime a new contact is added.

[TOOL][WIN] Take screenshots of Recovery and Aroma

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​
This is a tool to get screenshots from Recovery or the Aroma Installer!
It's no big secret in the XDA community that you can use ffmpeg to convert your framebuffer to an image on some devices. I've found the ffmpeg values for the Nexus 7 2013, and made a batch script that lets you save as many screenshots as you would like in recovery or the aroma installer. This should work on all versions of Windows. I have only tested in Windows 7 and running the modified TWRP for multirom, which is based off of TWRP 2.6.3.1. It should work with regular TWRP as well as other recoveries. Please let me know if it works or not and what set up you have!!!
Why would anyone use this or do this?
Most people have actually no use for it whatsoever. It's pretty much useful for tutorials, showing anomalies, and showing off custom recovery themes. I needed to do it one time to show what I thought was an error in my recovery, but hadn't seen anyone post how to do it on the Nexus 7 2013, or any 1200x1920 device for that matter. While searching how to do this I came across this thread by @Whiskey103 :good: I learned a lot of useful information.
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 ffmpeg is the newest 32-bit version from their downloads page. You must have adb.exe, ffmpeg.exe, and the two dll files for adb in the same directory as this batch when you run it. The easiest thing to do is just extract the rar to a new directory, then run the file named RUNrs.bat. The screenshots will be saved in the same folder you unzip everything as 'timestamp'.png.
Download Recovery Screenshot.rar
To see whats in the batch script hit the show more content button below. I don't recommend viewing it if you've ever used the phrase "cat your buffer" before:cyclops:
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 7 2013
ECHO and 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 N7 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 rgb565 -s 1216x1920 -i frmbfr -vf crop=1200:1920:0:0 -vframes 1 -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 rgb565 -s 1216x1920 -i frmbfr -vf crop=1200:1920:0:0 -vframes 1 -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 7 2013, congratulations for successfully pulling
ECHO the framebuffer. To figure out the resolution to use, try adding 4,8,16, or 32 to your native width to
ECHO make room for the extra data, ioctrls?, at the end of each pixel row. Experiment with different pixel
ECHO formats 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
Thanks make my like easy now lol
sorry, wrong thread
Thanks!! :laugh:

[SCRIPT] Common ADB/FASTBOOT Functions

DISCLAIMER: I TAKE NO RESPONSIBILITY FOR DAMAGE CAUSED TO ANYONE OR ANYTHING BY USING MY SCRIPT. USE THIS AT YOUR OWN RISK.
So pretty much this is a script that can:
1. Flash a new boot animation without going through all the hassle of entering remounting commands. (Main reason why I wrote this) (Requires root and maybe adb insecure by chainfire)
2. Flash a new startup logo. (Requires unlocked bootloader)
3. Basic reboot commands with the press of a number.
4. Push and Pull files without entering commands, just need to specify the file location by dragging and dropping into the command window. (Some cases may need root. If your case does not need root, and the script says failed to restart adb as root, your command will still work, hopefully)
5. Install an apk the same way as 4. (If it says failed to restart as root it will still work in most cases)
6. Extremely noob friendly :laugh:.
Just a small little script to make your life a bit easier.
I tested this numerous times on a Moto G xt1032 running cyanogenmod 11 m4 and it showed no flaws. If this does not work for you try installing adb insecure by chainfire.
This works on windows only (I think).
If you find any bugs please tell me and I will try to fix even though I am just starting out with the wonders of developing. Some of the functions of the script need root access!
To use this, just copy and paste the lines below into a notepad window. Then save the file as something.bat Make sure to change the dropdown menu from txt document to all files when saving. Put the script in the folder where adb.exe and fastboot.exe are located. Double-click and enjoy!
Press "Click to show content" below!
@ECHO off
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo IF YOUR DEVICE IS LISTED BELOW TYPE 1
echo ELSE TYPE 2 TO EXIT
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
adb devices
SET /p startcheck= Type your choice:
if "%startcheck%" =="1" goto menu
if "%startcheck%" =="2" goto exit
:menu
cls
echo Type 0 for Device Check
echo Type 1 to Flash Boot Animation (ADB root required)
echo Type 2 to Flash Startup Logo
echo Type 3 to Reboot to Bootloader
echo Type 4 to Reboot
echo Type 5 to Pull a File
echo Type 6 to Push a File
echo Type 7 to Install Apk
echo Type 8 to Run ADB as Root
echo Type 9 to Browse and Copy Apps to Computer (ADB root required)
echo Type 10 to Browse and Copy SYSTEM Apps to Computer (ADB root required)
echo Type 11 to Exit
SET /p choice= Type your choice:
if "%choice%" =="0" goto devcheck
if "%choice%" =="1" goto anim
if "%choice%" =="2" goto logo
if "%choice%" =="3" goto rebootloader
if "%choice%" =="4" goto reboot
if "%choice%" =="5" goto adbpull
if "%choice%" =="6" goto adbpush
if "%choice%" =="7" goto apk
if "%choice%" =="8" goto adbroot
if "%choice%" =="9" goto apps
if "%choice%" =="10" goto sysapps
if "%choice%" =="11" goto exit
goto end
:end
cls
echo Type 1 to restart program
echo Type 2 to exit
SET /p restart= Type your choice
if "%restart%" =="1" goto menu
if "%restart%" =="2" goto exit
:exit
exit
:anim
cls
adb kill-server
adb start-server
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo IF YOUR DEVICE IS LISTED BELOW TYPE 1
echo ELSE TYPE 2 TO EXIT
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
adb devices
SET /p adb= Type your choice
if "%adb%" =="2" goto menu
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo TYPE THE PATH FOR YOUR bootanimation.zip
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SET /p bapath= Type your path here and press enter:
cls
adb wait-for-device root
timeout -t 1 > nul
echo Remounting system in read-write mode!
adb wait-for-device remount
timeout -t 2 > nul
adb wait-for-device shell "su -c 'mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system'"
echo Deleting existing bootanimation!
adb wait-for-device shell "su -c 'rm /system/media/bootanimation.zip'"
echo Sending new bootanimation!
adb push %bapath% /system/media
echo Remounting system in read-only mode!
adb wait-for-device shell "su -c 'mount -o ro,remount -t yaffs2 /dev/block/mtdblock1 /system'"
echo Done!
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo Press 1 to reboot!
echo Press 2 to exit!
SET /p dm= Type your choice
if "%dm%" =="1" goto reboot
if "%dm%" =="2" goto end
:logo
cls
echo Rebooting to bootloader...
adb reboot-bootloader
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo When device is in bootloader press any key to continue!
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PAUSE
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo IF YOUR DEVICE IS LISTED BELOW TYPE 1
echo ELSE TYPE 2 TO EXIT
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fastboot devices
SET /p fbdev= Type your choice
if "%fbdev%" =="2" goto menu
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo TYPE THE PATH FOR YOUR logo.bin
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SET /p lopath= Type your path here and press enter:
cls
echo Sending new logo!
fastboot flash logo %lopath%
echo Rebooting...
fastboot reboot
echo Done!
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo Press any key to return to menu!
PAUSE
goto menu
:reboot
cls
adb reboot
echo Rebooting...
timeout -t 3 > nul
goto menu
:rebootloader
cls
adb reboot-bootloader
echo Rebooting to bootloader...
timeout -t 3 > nul
goto menu
:adbpull
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo TYPE THE PATH FOR THE FILE TO PULL
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SET /p adbpullpath= Type your path here and press enter:
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo TYPE THE PATH FOR THE FILE TO SAVE
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SET /p adbpullsave= Type your path here and press enter:
cls
echo !!!IF THIS ACTION NEEDS ROOT RUN OPTION 8 FROM MENU FIRST!!!
timeout -t 2 > nul
echo Pulling File!
adb wait-for-device pull %adbpullpath% %adbpullsave%
echo Done!
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo Press any key to return to menu!
PAUSE
goto menu
:adbpush
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo TYPE THE PATH FOR THE FILE TO PUSH
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SET /p adbpushpath= Type your path here and press enter:
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo TYPE THE PATH FOR THE DIRECTORY TO PUSH TO
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SET /p adbpushsave= Type your path here and press enter:
cls
echo !!!IF THIS ACTION NEEDS ROOT RUN OPTION 8 FROM MENU FIRST!!!
timeout -t 2 > nul
echo Pushing File!
adb wait-for-device push %adbpushpath% %adbpushsave%
echo Done!
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo Press any key to return to menu!
PAUSE
goto menu
:apk
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo IF YOUR DEVICE IS LISTED BELOW TYPE 1
echo ELSE TYPE 2 TO EXIT
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
adb devices
SET /p apkcheck= Type your choice
if "%apkcheck%" =="2" goto exit
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo TYPE THE PATH FOR THE APK TO INSTALL
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SET /p apkinstall= Type your path here and press enter:
cls
echo !!!IF THIS ACTION NEEDS ROOT RUN OPTION 8 FROM MENU FIRST!!!
timeout -t 2 > nul
echo Installing Apk!
adb wait-for-device install %apkinstall%
echo Done!
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo Press any key to return to menu!
PAUSE
goto menu
:devcheck
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo DEVICE CONNECTION CHECK
echo Your device should be listed below!
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
adb devices
PAUSE
goto menu
:adbroot
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo Trying to run ADB as root!
adb wait-for-device root
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo !!!ONCE DEVICE RECONNECTS TO COMPUTER PRESS ANY KEY TO GET TO MENU!!!
PAUSE
goto menu
:apps
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
adb wait-for-device shell "su -c 'ls /data/app'"
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo Do you want to copy an app to the computer?
set /p appans= (Y or N):
if "%appans%" =="N" goto menu
if "%appans%" =="n" goto menu
if "%appans%" =="no" goto menu
if "%appans%" =="No" goto menu
if "%appans%" =="NO" goto menu
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
adb wait-for-device shell "su -c 'ls /data/app'"
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo Type the app's name EXACTLY including the .apk extension
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
set /p appcp= Type the name EXACTLY as it appears:
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo Type the destination directory
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
set /p appdd= Destination Directory:
cls
echo Copying App!
adb pull /data/app/%appcp% %appdd%
echo Done!
PAUSE
goto menu
:sysapps
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
adb wait-for-device shell "su -c 'ls /system/app'"
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo Do you want to copy an app to the computer?
set /p sappans= (Y or N):
if "%sappans%" =="N" goto menu
if "%sappans%" =="n" goto menu
if "%sappans%" =="no" goto menu
if "%sappans%" =="No" goto menu
if "%sappans%" =="NO" goto menu
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
adb wait-for-device shell "su -c 'ls /system/app'"
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo Type the app's name EXACTLY including the .apk extension
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
set /p sappcp= Type the name EXACTLY as it appears:
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo Type the destination directory
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
set /p sappdd= Destination Directory:
cls
echo Copying App!
adb pull /system/app/%sappcp% %sappdd%
echo Done!
PAUSE
goto menu

[SCRIPT] Bootanimation.zip Flasher

This is a simple script that automatically flashes a new boot animation. It does the remount and deletion commands automatically to provide an easy and fast way to flash boot animations.
ADB ROOT command must be functioning for this to work properly.
DISCLAIMER: THE CREATOR IS NOT RESPONSIBLE FOR DAMAGE CAUSED BY THE USE OF THIS SCRIPT! USE THIS AT YOUR OWN RISK!!!
1. Copy the code below into a new notepad window.
2. Save the file as bootanimation flasher.bat in the folder where adb and its components are located. (MAKE SURE YOU HAVE THE .bat EXTENSION)
3. Run the script!
Common Errors:
"error protocol failure" - this error occurs when the command adb root did not function properly. Fix the issue and try again. Try and re-enable usb debugging if it still doesn't work.
Try and use this app to get adb root functioning: http://forum.xda-developers.com/showthread.php?t=1687590
This was tried and tested with success on a oneplus one and a moto g (1st gen)
Script (click button to show):
@echo off
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo ROOT ACCESS IS REQUIRED. ADB ROOT COMMAND MUST BE FUNCTIONING.
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo THE CREATOR OF THIS SCRIPT IS NOT RESPONSIBLE FOR ANY DAMAGE!
echo USE THIS AT YOUR OWN RISK!!!
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PAUSE
cls
echo Starting ADB!
adb kill-server > nul
adb start-server > nul
echo Done!
timeout -t 1 > nul
:menu
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo IF YOUR DEVICE IS LISTED BELOW TYPE 1
echo TYPE 2 TO TRY AGAIN
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
adb devices
SET /p startcheck= Type your choice:
if "%startcheck%" =="1" goto ask
if "%startcheck%" =="2" goto menu
goto menu
:ask
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo TYPE 1 TO FLASH BOOTANIMATION!
echo TYPE 2 TO BACKUP EXISTING BOOTANIMATION THEN FLASH!
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SET /p askbackup= Type your choice:
if "%askbackup%" =="1" goto anim
if "%askbackup%" =="2" goto backup
goto menu
:backup
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo TYPE THE PATH TO BACKUP BOOTANIMATION TO!
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SET /p backuppath= Type your path and press enter:
cls
echo Backing Up!
adb pull /system/media/bootanimation.zip %backuppath%
echo Done
PAUSE
goto anim
:anim
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo TYPE THE PATH FOR YOUR bootanimation.zip
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SET /p bapath= Type your path here and press enter:
cls
echo Running command adb root...
adb wait-for-device root > nul
timeout -t 1 > nul
echo Success, Root Access obtained!
echo Remounting system in read-write mode!
adb wait-for-device remount > nul
timeout -t 1 > nul
adb wait-for-device shell "su -c 'mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system'"
echo Remount Succeded!
echo Deleting existing bootanimation!
adb wait-for-device shell "su -c 'rm /system/media/bootanimation.zip'"
echo Sending new bootanimation!
adb push %bapath% /system/media
echo Remounting system in read-only mode!
adb wait-for-device shell "su -c 'mount -o ro,remount -t yaffs2 /dev/block/mtdblock1 /system'"
echo Done!
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo Press 1 to Reboot!
echo Press 2 to Exit!
SET /p dm= Type your choice
if "%dm%" =="1" goto reboot
if "%dm%" =="2" goto exit
:reboot
cls
echo Rebooting!
adb reboot
timeout -t 1 > nul
PAUSE
:exit
exit

Categories

Resources