Here's a small program for windows to automatically link the AdFree hosts file on the sdcard to the system hosts file. This should fix issues with AdFree not working for peope with HTC phones. You must have CWM and the Android SDK installed in"C:\Android\". Just extract the program and run it.
How is it applied? I downloaded and saw its a zip. Do we flash it?
Sent from my Incredible using XDA App
Gahh Its Lee said:
How is it applied? I downloaded and saw its a zip. Do we flash it?
Sent from my Incredible using XDA App
Click to expand...
Click to collapse
Its an EXE inside the zip -- so run it on your Windows PC. It looks like it might use ADB. In that case you'll need the Android SDK installed (or adb.exe etc in the folder with it).
Run the program on your PC and follow its directions.
Adfree already works fine on my N1 -- just trying to clarify a bit.
Thanks for the contribution. I'm sure HTC owners will really appreciate it.
KillerBeaver said:
Here's a small program to automatically link the AdFree hosts file on the sdcard to the system hosts file. This should fix issues with AdFree not working for peope with HTC phones.
Click to expand...
Click to collapse
Your postcount is 1 and you attach an executable???
Sorry...I don't trust you.
I'm on from mobile so I didn't catch that but yea that doesn't make sense
Sent from my Incredible using XDA App
mik101 said:
Its an EXE inside the zip -- so run it on your Windows PC. It looks like it might use ADB. In that case you'll need the Android SDK installed (or adb.exe etc in the folder with it).
Run the program on your PC and follow its directions.
Adfree already works fine on my N1 -- just trying to clarify a bit.
Thanks for the contribution. I'm sure HTC owners will really appreciate it.
Click to expand...
Click to collapse
Correct. The instructions are shown as soon as you run the executable. You will need to the android sdk installed to your root drive. Then just follow the instructions. It works on my HTC Aria. I don't have any other HTC phones to test it on. Basically I just made an executable to save time when i switched between ROMs. Figured it might make things simpler for people who cant get adFree to work on their phones by default.
I used to use this to get adfree working, not a problem now as I have s-off.
Is s-on why adfree don't work on other HTC devices, I don't know I've only ever had a desire. If it is flashing the zip attached here should work too, doesn't require adb or anything.
mercianary said:
Your postcount is 1 and you attach an executable???
Sorry...I don't trust you.
Click to expand...
Click to collapse
Antivirus > You
Check something out yourself before you fear monger.
mik101 said:
Antivirus > You
Check something out yourself before you fear monger.
Click to expand...
Click to collapse
I did check it (before I posted), and it came up clean. But I still stand by what I said.
I don't run code on my hardware unless it comes from a reputable source or I can see what its doing before it does it, ie a script.
I'm not fear mongering at all, I said nothing of a virus or anything malicious (intended or not) at all, I only let my opinion be known and let others make their own mind up.
Its cool. I understand your concern. I just used a compiler to convert the batch file i wrote. It's old school, but it gets the job done. Here it is if you wanna see what's goin on.
Code:
@echo off
title HTC AdFree Fix
cd C:\android\platform-tools
rem Tommy Arnold
rem (CC-BY-NC-SA) 2011
echo -------------------------------------------------------------------------
echo AdFree Fix for HTC w/ Clockwork Recovery
echo -------------------------------------------------------------------------
echo Note:
echo You must have the Android SDK installed to the root of your hdd for
echo this fix to work. Also be sure USB Debugging is enabled in Android.
echo.
echo 1. Search for Adfree Android on the market
echo.
echo 2. Install and run
echo.
echo 3. Allow it to download and install new hosts file,
echo it will copy it to your sdcard and try to replace
echo /system/etc/hosts but fail (it should reboot the phone shortly)
echo.
echo 3a. If phone doesn't reboot check your SD card for a file simply named
echo "hosts". If it's there, then continue.
echo.
echo 4. Connect USB and press any key to boot into clockwork recovery volume.
echo.
pause
cls
echo -------------------------------------------------------------------------
echo Rebooting into Clockwork Recovery Volume
echo -------------------------------------------------------------------------
echo.
echo Please wait...
echo.
adb reboot recovery
ping -n 13 127.0.0.1 > nul
else
cls
echo -------------------------------------------------------------------------
echo Fixing AdFree for HTC
echo -------------------------------------------------------------------------
echo.
echo Please wait...
adb shell mount /system
adb shell mount /data
adb shell mount /sdcard
adb shell cp /sdcard/hosts /data/data/hosts
adb shell mv /system/etc/hosts /system/etc/hosts.bak
adb shell ln -s /data/data/hosts /system/etc/hosts
adb reboot
adb kill-server
cls
echo -------------------------------------------------------------------------
echo AdFree fix for HTC has completed
echo -------------------------------------------------------------------------
echo.
echo When your phone reboots try AdFree again, it should work! :)
echo.
pause
I reuploaded it today cuz i accidentally forgot to kill the adb server after it was finished. Either way, it works.
I tried this on my HTC Evo and it didn't work. I still receive the ads when in Pandora.
Even after downloading and installing the host file in ad free again?
Sent from my HTC Liberty using XDA App
try this
work wery well >>> http://forum.xda-developers.com/showthread.php?p=10045849#post10045849
KillerBeaver said:
Here's a small program to automatically link the AdFree hosts file on the sdcard to the system hosts file. This should fix issues with AdFree not working for peope with HTC phones.
Click to expand...
Click to collapse
Works for me. THANKS !
Related
Pushing files over adb has never been easy. There are some external tools for sending files over adb, but I like native, Windows-integrated ones.
The trick is extremely easy. It works with adbWireless and similar applications. It could work with USB connection too, but I rarely use it.
HEADS UP: Be sure to check all nice(r) scripts by Daneshm90 down the thread!
Prerequisites:
-adb
-adbMagic or similar for wifi connection, none for USB only.
How to?
For better look you will need two files:
adb_send.cmd;
Code:
adb connect 192.168.1.103
adb push %1 /sdcard/
pause
and a shortcut to it, where you can customize icon and name.
1) create your adb_send.cmd anywhere on disk (I put mine in android-sdk-windows\tools directory),
2) customize the ip address, to point at your device (I have router with static DHCP, so everytime my device connects it leases the same address)
3) then go to:
Windows Vista/7:
Code:
%APPDATA%\Microsoft\Windows\SendTo
(paste it in explorer's address bar, or hit WIN+R and paste there, Enter), and place shortcut to script file created earlier. (drag it with right mouse button)
4) customize the icon and name of the shortcut
Next time you click on any file menu appears:
good idea, btw how did you find the ip address? 192.168.1.103... i am not able to send using the same
When you use adbWireless, under big orange button you will see something like: "adb connect 192.168.1.103:5555"
ravi4chahal said:
good idea, btw how did you find the ip address? 192.168.1.103... i am not able to send using the same
Click to expand...
Click to collapse
I think that you will have to find your own ip adress mate
xan said:
When you use adbWireless, under big orange button you will see something like: "adb connect 192.168.1.103:5555"
Click to expand...
Click to collapse
ok thanks, I installed adbWireless and now it is working ... however is there any way of getting rid of the CMD window that pops up while transfer?
hmm..
I think there is. Right click on the shortcut (this in "%APPDATA%\Microsoft\Windows\SendTo")properities -> run -> minimised
Delete "pause" line from script, and command line is hidden.
//double, sry
How's this :
Code:
@echo off
echo Where to push the file ? eg (/data/1.apk)
SET /P pat=Enter :
echo Pushing...
adb push "%1" /sdcard/%~n1
adb shell su -c "cp /sdcard/%~n1 %pat%" -root
adb shell rm /sdcard/%~n1
echo Done
It works directly for me.
Right click the file, Send to - > Bluetooth Devices.
Select my Phone and press Send.
Very cool tip, made a couple different cmd shortcuts to copy to different part of the sdcard(roms/apps/misc).
peachpuff said:
Very cool tip, made a couple different cmd shortcuts to copy to different part of the sdcard(roms/apps/misc).
Click to expand...
Click to collapse
The script i posted above does just that except you don't need multiple shortcuts.
When you run it'll as you where u want the file to go.
Thanks for the tip.
And Daneshm90 i tried your command, but..is there a way to do it without su? Since when i try ur command i always have to accept the root request, and it dosnt seem to push the file right anyway. So im asking is there a way to do it without su? Cuz if i do the original i dont need to press the root request all the time.
Thanks in advance mate.
borgen92 said:
Thanks for the tip.
And Daneshm90 i tried your command, but..is there a way to do it without su? Since when i try ur command i always have to accept the root request, and it dosnt seem to push the file right anyway. So im asking is there a way to do it without su? Cuz if i do the original i dont need to press the root request all the time.
Thanks in advance mate.
Click to expand...
Click to collapse
It should only ask you to accept once, not everytime.
Well sure i can modify mine where if u say /sdcard/ then it doesn't do that whole root crap and just pushes to sdcard.
Gimme a few.
Daneshm90 said:
It should only ask you to accept once, not everytime.
Well sure i can modify mine where if u say /sdcard/ then it doesn't do that whole root crap and just pushes to sdcard.
Gimme a few.
Click to expand...
Click to collapse
Thanks alot man, you'r awesome
Here try this one
Code:
@echo off
echo Where to push the file ? eg (/data/1.apk)
SET /P pat=Enter :
if not "%pat:sdcard=%"=="%pat%" goto sdcard
echo Pushing...
adb push %1 /sdcard/%~n1
adb shell su -c "cp /sdcard/%~n1 %pat%" -root
adb shell rm /sdcard/%~n1
echo Done
:sdcard
echo Pushing...
adb push %1 %pat%
echo Done
Note, if you have a rom where when you do "adb shell" and ur automatically in "su" mode. Then u can simply change the script to :
Code:
@echo off
echo Where to push the file ? eg (/data/1.apk)
SET /P pat=Enter :
echo Pushing...
adb push %1 %pat%
echo Done
flawless!!!!
Thank you!
Does this require root?
Daneshm90 said:
Here try this one
Code:
@echo off
echo Where to push the file ? eg (/data/1.apk)
SET /P pat=Enter :
if not "%pat:sdcard=%"=="%pat%" goto sdcard
echo Pushing...
adb push %1 /sdcard/%~n1
adb shell su -c "cp /sdcard/%~n1 %pat%" -root
adb shell rm /sdcard/%~n1
echo Done
:sdcard
echo Pushing...
adb push %1 %pat%
echo Done
Note, if you have a rom where when you do "adb shell" and ur automatically in "su" mode. Then u can simply change the script to :
Code:
@echo off
echo Where to push the file ? eg (/data/1.apk)
SET /P pat=Enter :
echo Pushing...
adb push %1 %pat%
echo Done
Click to expand...
Click to collapse
thats awesome, how would one make it crate and copy the folder structure as well? did this with a folder with pics in it and it just put every pic on the root of my sd card.
or how about asking for ip then using what was imputed?
Send To Menu For ADB Install
You can modify the above instructions to use the Send to Menu to install applications over wireless.
Code:
adb connect 192.168.1.46:5555
adb install %1
pause
Substitute your IP address for 192.168.1.46 (may or may not need the port)
Save your Install.cmd or anything.cmd anywhere on your hardisk. Make a shortcut in
Code:
%APPDATA%\Microsoft\Windows\SendTo
to the .cmd.
Right click an .apk and select Send To -> Install.cmd
Works like a dream using my Nexus 1 and adbWireless
nice one @wacckkoo1
this has so much potential.
i found an app on the market called ADB over WIFI widget. it dosent care if your connected to wifi or not, it will just start, making this possable to do while wireless tethering to a laptop
thats why im wanting to know how i can get it to ask for ip address because it wont always be the same.
Problem writing /system/etc/hosts
Hi forum,
I have searched around the forum for advice regarding copying my own hosts file to my wildfire, but it wont work. I have used adb to transfer the file from computer, and used the terminal on the phone by directly getting it from the internet.
On the terminal i followed:
http://forum.xda-developers.com/showpost.php?p=3719090&postcount=6
where i get the error "cant open 'hosts' : Out of mermory"
and via the adb where i followed:
http://forum.xda-developers.com/showpost.php?p=6697366&postcount=2
where it gives the same error.
It might be me missing out on something but i cant figure out what i am doing wrong.
I am running CyanogenMod 6.1 stable 12/12-2010.
I hope someone have the time and help me figure this out.
Thanks in advance
Omorashi
Omorashi said:
Hi forum,
I have searched around the forum for advice regarding copying my own hosts file to my wildfire, but it wont work. I have used adb to transfer the file from computer, and used the terminal on the phone by directly getting it from the internet.
On the terminal i followed:
http://forum.xda-developers.com/showpost.php?p=3719090&postcount=6
where i get the error "cant open 'hosts' : Out of mermory"
and via the adb where i followed:
http://forum.xda-developers.com/showpost.php?p=6697366&postcount=2
where it gives the same error.
It might be me missing out on something but i cant figure out what i am doing wrong.
I am running CyanogenMod 6.1 stable 12/12-2010.
I hope someone have the time and help me figure this out.
Thanks in advance
Omorashi
Click to expand...
Click to collapse
Lolz , u were sooo close !!!!!
Reboot into Recovery , goto partitions menu and mount /system partition then use adb from ur computer
adb remount
adb push hosts /system/etc/hosts
adb reboot
should fix it (i recommend that you search for the new hosts file from adfree adblocker , also in the new Wildpuzzle Rom if your comfortable moveing files between roms before flashing)
Hope this helps
PS. Until AlphaRev comes out we dont have Read/write Access to the /system partition while the phone is running :-( (Google S-ON HTC Devices)
Splendid
Ok thanks, it works. I knew it was some sort of permission that was needed, which made me crazy. (I am new in this android world)
I just made it into a batch file, so it is is easy to update the hosts file as new comes along. This is also to make it easier for the next that comes along with my problem. It requires adb ofcourse.
By a local hosts file (can probably be made more user friendly, but it works for me):
Code:
@ echo off
echo Updating hosts file:
echo You need to have added the adb path to Environment variables,
echo Or placed this batch file in the directory with adb.
echo The hosts file should be in the same directory as this file.
echo After unpause are the phone started in recovery:
pause
adb reboot recovery
echo Waiting for device to reboot into recovery
echo After it is done rebooting do the following:
echo Go to partitions menu
echo Mount system (first option)
echo Unpause and the file gets overwritten:
pause
adb remount
adb push hosts /system/etc/hosts
echo Check if it is done correctly (the transfer).
adb reboot
pause
And by the way i used the updated hosts file on "external website" that was recommended in another thread i found about updating hosts file on this forum. (Cant post the direct link)
How to make a windows one click tool,
Featured on the XDA Portal! Check it out
Hello all I use these one click tools for just about everything. They make things simple. Today I will demonstrate how to make a simple one click tool to change the boot animation on your phone.
More advanced users and after you have mastered the basics check out post 2 for creating a multi tool with menus etc!
Remember please this is just a tutorial and you will have to edit it and create one specific for your device!
XDA Senior Member mnishamk has expanded upon this tutorial even further and made it automated! Check out his thread HERE.
I will be making this tool compatible with my Samsung galaxy note 2 with custom bootanimation support.
You should also know that some phones need to have custom bootanimation support for this tool to work such as samsung.
Also your phone must be rooted.
Disclaimer you try this at your own risk!
To learn more about ADB/Fastboot you can check out the tutorials I learned from:
[TUTORIAL] Everything about ADB - A reference for everyone Great guide by: Droidzone
[GUIDE][ADB]Easiest How to use adb, logcat, etc for noobs and newbies This is a newer guide by: iamareebjamal he explains ADB, commands, uses, logcat and a few other goodies.
[GUIDE] ADB Workshop and Guide for everyoneAnother good guide to ADB by: Captainkrtek
Simple guide to ADB/FastbootEasy to follow adb/fastboot guide by: Andy
Files you will need are included in this zip:
Bootaniflasher.zip
It contains:
Adb.exe – file needed for adb to function
Adbwinapi.dll – needed for windows
Adbwinusbapi – needed for windows
Fastboot.exe – needed for some mods
Bootani.bat – the one click file that runs your script
Programs you will need:
Standard windows notepad
What is so great about this, the only thing you will need to create/edit is the bootani.bat file! Also it is so simple that after reading this tutorial a cave man could do it!
Creating the bootani.bat file:
1. open a blank notepad page
2. click file/save as then type in bootani.bat leave the type as a text
document and encoding to ansi.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
3. Now to write the script that will actually change the bootanimation
In the open notepad
Type the following information so that it looks like the screenshot:
ECHO is used to put text on the UI screen similar to the ui_print function in an updater script.
Code:
@ECHO OFF
COLOR 9b - this is the color of the UI - for a list of these click [URL="http://www.computerhope.com/color.htm"]here[/URL]
ECHO.
ECHO one click bootanimation flasher – title of the one click tool
ECHO. ends the text
ECHO By: XDA Eraste – you can put whatever you want here or leave it out..
ECHO.
ECHO.
ECHO. Adding space between text that appears by typing more ECHO. lines
ECHO Use this at your own risk! – simple disclaimer
ECHO.
ECHO By pressing enter you understand the risks – disclaimer
ECHO.
ECHO.
ECHO make sure your phone has usb debugging mode enabled! - information
ECHO.
ECHO.
ECHO make sure you put your custom bootanimation.zip file in this folder – info
ECHO.
PAUSE – this means nothing else will happen until user presses enter, any button
ECHO Loading files and preparing to send – simple information that displays
ECHO.
adb wait-for-device - this tells adb to wait until user has connected the phone
ECHO sending bootanimation - simple information that is displayed
ECHO.
adb push bootanimation.zip /system/media/bootanimation.zip - script that installs
the bootanimation!
ECHO Almost finished – more info
ECHO.
ECHO finished rebooting!
adb reboot – tells the phone to restart this allows you to make sure changes stuck
ECHO thanks for using this script
ECHO.
PAUSE
EXIT - closes the UI
4. Now click file/save
5. Put this bootani.bat file in your folder containing the above files also
6. Now find a custom bootanimation that you would like use and place the
bootanimation.zip in this folder also.
7. To test your new script plug up your phone make sure usb debugging is
enabled then double click the bootani.bat file and follow your on screen
directions!
If you did everything correct the above settings will create a crisp blue UI like this:
This tutorial and attached files will work on the Samsung galaxy note 2 with custom bootanimation support!
You can edit this bootani.bat to whatever you would like. For instance you can use a one click tool to reinstall all your apps after you flash a new rom!
There really are endless possibilities with one click tools and you can customize the UI, script, etc to your liking.
Those other processes are a little more in depth but virtually the same process in creating them.
You can name the bootani.bat file to whatever you like and customize the UI in whatever way you like by following the template above. The only things that will change in creating other types of one click tools are the scripts that you type into the notepad file.
Common places of bootanimation files:
Samsung: if custom bootanimation is supported by your rom usually in /system/media
HTC: /system/customize/resource
Note: On other devices such as HTC custom bootanimation support is not necessary as they use the standard .zip for the animation you can change them simply by typing the original name of the boot zip in your script. Example The ATT HTC one x stock boot zip file is named ATT_bootanimation.zip. So you can rename your custom one to this name stick it in your folder then change the one click script to reflect this name and voila!
Bootanimations can be changed on rooted phones only!
Hopefully this will help some of your newer people in gaining a bigger interest in creating cool programs that you can use on your own!
Hit thanks if this helped you learn something new!
Here I will explain some other "common" uses for the one click tool.
Using the same principals above:
The one command that should always be in your script file:
adb wait-for-device – remember this tells the program to wait until the device as been connected and detected.
You can use your one click tool to do many things: *WARNING The following procedures are dangerous and can potentially brick your device. Please experiment with easier things before trying your hand at boot.img’s, etc!
1. Flash a kernel/boot.img for HTC devices or those that use a bootloader. This will not work on Samsung devices or devices that
take “tricks” to get into fastboot or the bootloader. In addition to root, Also this requires your device's bootloader to be unlocked!
You will need to have your kernel/boot.img file in the folder just like the
bootanimation.zip file as before. Anything you want to flash needs to be in this
folder. Not in any subfolders just inside the root folder!
A. While writing the script in your bootani.bat ( or whatever you named it) file from above. You will leave out the bootanimation stuff
and add this:
B. Script the bat file as normal then use these commands instead of the others from above to flash: so the script should look
something like this:
Code:
ECHO.
ECHO Press any key to continue
ECHO.
PAUSE.
adb wait-for-device
adb reboot bootloader - this command will get you into fastboot. Make sure by looking at your phones screen it says fastboot usb or
something similar indicating you are in fastboot.
ECHO Rebooting to fastboot please wait and do not touch device!
ECHO.
fastboot flash boot boot.img - this is the command that will actually flash the kernel/ boot.img file
ECHO.
ECHO.
ECHO Finished you can now exit this tool and reboot the phone to recovery or the os
ECHO.
ECHO.
EXIT
If a dev has named this kernel/boot.img file to something else ending in .img, .elf, etc make sure you type in the correct name. Such as elekernel.img you would type in the command line the elekernel.img name instead of boot.img so it should look like this:
Code:
fastboot flash boot elekernel.img
your kernel can also be named kernel.elf, etc depending on what type of phone you are using. Just make sure to change boot.img to whatever the name of the file is you want to flash.
Then you can continue scripting your bat file to your liking!
2. This is my favorite! This procedure is harmless if done right but I must say it is still dangerous and you accept the risk if you
decide to do it. This only requires your phone to be rooted!
I have a set of ringtones, alarm sounds, ui, sounds, and notification tones that I use on every phone. So instead of putting them in folders on my sd card or phone storage, I use my one click tool to install them to the system directories so that they show up in the stock ringtone, notification, alarm, etc selection methods.
A. Take your bat file from above name it whatever you like I use: mysounds.bat
B. Take the sounds you would like to flash and put them in your folder containing the adb files, bat file, etc.
C. Script your bat file as normal but leave out the bootanimation stuff. Instead add the following commands: so that it looks something
like this:
Code:
ECHO.
ECHO Press any key to continue
ECHO.
PAUSE
adb wait-for-device
ECHO sending your media files please wait and do not touch the phone!
ECHO.
adb push yoursoundsname.mp3 /system/media/audio/ringtones/yoursoundsname.mp3
Now remember the path to your system ringtones etc, may be different depending on the type of phone you have. The above location will work for samsung note 2 and the HTC one X This path is the most common path but still it depends on your phone. Simply use your file explorer and navigate your system folder until you find the path you need and type it in the command line instead of what I have above.
Repeat the above command line until you have all the tones you are flashing added into your bat file
adb push yoursoundsname.mp3 /system/media/audio/ringtones/yoursoundsname.mp3
adb push yoursoundsname1.mp3 /system/media/audio/ringtones/yoursoundsname1.mp3
adb push yoursoundsname2.mp3 /system/media/audio/notifications/yoursoundsname2.mp3
the above one will go into the notification folder for say your favorite SMS tone instead of the ringtone folder
adb push yoursoundsname.ogg /system/media/audio/ui/Lock.ogg <-- AH you see something new! This command will change your screen lock sound to whatever file you want it! This file must be in .ogg format! Make sure its no longer than about 1 second. Or you can get a terrible AudioOut_02 wakelock or similar that will drain your battery!
ECHO finished. Rebooting so changes take effect. After phone reboots you may unplug it
ECHO.
adb reboot
ECHO.
ECHO Thanks
ECHO.
EXIT
As you can see the combinations are endless with the one click tool!
Enjoy
Creating a multi tool with a menu and selectable options!!!!!
Now I will expand the above guides and show you how to make your very on multi tool with a menu and options!
You can download this multitool.zip to use as a guide.
It contains this bat file as well as a bootanimation.zip and an mp3 in the ringtones folder. Simply extract it as before and open it up.
So lets begin.
What are we going to do? We will make a multi tool that will open a few webpages, flash a new bootanimation, or send some ringtones to your sdcard.
First we create a bat file as before. You can name it whatever you like.
Then we use this script to make the new tool: Ill explain the script below
Code:
ECHO OFF
color 9f
CLS
:MENU
CLS
ECHO.
ECHO Before you start make sure your phone has USB Debugging enabled!
ECHO.
ECHO.
ECHO .... One CLick Multi Tool ....
ECHO Make your selection below
ECHO ..............................
ECHO.
ECHO 1 - Visit XDA
ECHO 2 - Visit Scotts ROMS
ECHO 3 - Visit EMBLWPDesign
ECHO.
ECHO 4 - Flash a new bootanimation: make sure your custom bootanimation
ECHO is in the bootani folder and named bootanimation.zip!
ECHO 5 - Flash New Ringtones
ECHO 6 - Exit this tool
ECHO.
ECHO 7 - Reboot Device
ECHO.
ECHo.
SET /P M=Type your choice then press ENTER:
IF %M%==1 GOTO XDA
IF %M%==2 GOTO SROMS
IF %M%==3 GOTO EMB
IF %M%==4 GOTO BA
IF %M%==5 GOTO RT
IF %M%==6 GOTO EOF
IF %M%==7 GOTO RD
:XDA
START "" "http://www.xda-developers.com"
GOTO MENU
:SROMS
START "" "http://www.scottsroms.com"
GOTO MENU
:EMB
START "" "http://www.emblwpdesign.com"
GOTO MENU
:BA
adb wait-for-device
adb push bootani/bootanimation.zip /system/media
GOTO MENU
:RT
adb wait-for-device
adb push ringtones /storage/extSdCard/ringtones
GOTO MENU
:RD
adb wait-for-device
adb reboot
GOTO MENU
This will give us a multi tool with a menu were you can select what to do!
:MENU starts the menu making process as an anchor.
ECHO 1 - Visit XDA this will be option one on the menu simple coding! Followed by options 2 and 3 then a space with ECHO. then option 4 through 6 followed by another space using ECHO. finally option 7.
The next bit of menu code that will be different than the regular batch file is the variables!
SET /P M=Type your choice then press ENTER: - this line is were the user will input their selection
IF %M%==1 GOTO XDA - this line begins your variables, so if 1 is selected the script will jump to anchor :XDA and run from there. You can have as many variables as you would like.
Make sure your GOTO ??? command and the anchor later in the script :??? are the same for each variable as above in the script.
Now execution of the selection:
:XDA this line is an anchor for selection 1.
under your anchor you type what you want the script to do then you type GOTO MENU so that the user is taken back to the menu.
You can have the tool exit after any selection you would like. So for instance if I wanted the script to close after the user selected option 1 I would instead of typing GOTO MENU type EXIT
You would repeat this process using the above script as a guide until you had your multi tool the way you wanted it!
With the multi tool you can have things in folders inside the root folder as long as you add the correct path to the items as in the script above with the bootanimation.zip. You see it is located in /bootani within the root folder.
Your knew tool with a menu should look like this: Without option 8. Thats coming later!
Creating these tools with multiple menus!
Ok now you guys should pretty much have the basics of making these tools down. Creating multiple menu's in these tools is just as easy as anything else.
This tool I created will show you that function:
Download appbackup tool. This tool is complete and will work. You can use it, modify it how you want etc.
The code contained in the batch file from the backup tool is as follows with multiple menus:
Code:
ECHO OFF
color 9f
CLS
:MENU
CLS
ECHO.
ECHO ..................................
ECHO One click app backup
ECHO Make your selection below
ECHO ..................................
ECHO Developed by: XDA Eraste
ECHO ..................................
ECHO One click app backup
ECHO and restore
ECHO ..................................
ECHO.
ECHO.
ECHO.
ECHO Please review the readme file before continuing.
ECHO.
ECHO This tool is safe however I cannot take responsibility should
ECHO anything negative happen to your phone. Use this tool at your own risk.
ECHO.
ECHO 1 - Continue
ECHO 2 - Exit tool
ECHO 3 - Readme File
ECHO 4 - Credits/Share policy
ECHO.
SET /P M=Type your choice then press ENTER:
IF %M%==1 GOTO MENU1
IF %M%==2 GOTO EOF
IF %M%==3 GOTO RED
IF %M%==4 GOTO MENU2
:RED
ECHO.
START readme.txt
GOTO MENU
:MENU1
color 9f
CLS
ECHO.
ECHO ...............................
ECHO Main Menu
ECHO ...............................
ECHO.
ECHO.
ECHO.
ECHO 1 - Backup apps - This will only backup the apps not the
ECHO data. Use this for a "fresh" app install
ECHO after flashing a new rom, etc.
ECHO.
ECHO 2 - Restore apps - Remember no data will be restored these
ECHO will be "fresh" apps.
ECHO.
ECHO 3 - Exit tool
ECHO 4 - Reboot Device
ECHO 5 - Return to previous menu
ECHO.
SET /P M=Type your choice then press ENTER:
IF %M%==1 GOTO BUP
IF %M%==2 GOTO RES
IF %M%==3 GOTO EOF
IF %M%==4 GOTO REB
IF %M%==5 GOTO MENU
:BUP
ECHO Backing up apps to backup folder that will be created here.
ECHO.
ECHO This can take a while depending on how many apps you have
ECHO Press enter to continue
ECHO.
PAUSE
adb wait-for-device
adb pull /data/app ./backup
ECHO.
ECHO Backup finished Press Enter
ECHO.
PAUSE
GOTO MENU1
:RES
ECHO.
ECHO Restoring apps please wait this can take a while!
ECHO Hit enter to continue.
ECHO.
adb wait-for-device
adb install backup/*.apk
ECHO.
ECHO Finished Restoring apps. You can reboot now and apps should
ECHO show up in Google Play as installed.
PAUSE
GOTO MENU1
:REB
ECHO.
ECHO Are you sure you want to reboot device?
PAUSE
adb wait-for-device
adb reboot
ECHO.
ECHO Rebooting press any key to return to the menu.
PAUSE
GOTO MENU1
:MENU2
CLS
COLOR 04
ECHO.
ECHO ...........................................
ECHO Credits/Share policy please check them out!
ECHO ...........................................
ECHO.
ECHO 1 - Visit XDA
ECHO 2 - Visit ScottsROMS
ECHO 3 - Visit EMB LWP Design - My site
ECHO 4 - Return to main menu
ECHO.
ECHO .......................................
ECHO Share Policy
ECHO This tool created by eraste @ XDA
ECHO For all its users. Feel free to use this
ECHO tool at will. If you use portions of it
ECHO to make your own all I ask is that you
ECHO acknowlege myself a little.
ECHO Credits:
ECHO Developed by: Eraste
ECHO Backup script: Scott @scottsroms
ECHO Restore script: Eraste
ECHO Knowledge: XDA
ECHO ........................................
ECHO.
SET /P M=Type your choice then press ENTER:
IF %M%==1 GOTO XDA
IF %M%==2 GOTO SR
IF %M%==3 GOTO EMB
IF %M%==4 GOTO MENU1
:XDA
ECHO.
START "" "http://forum.xda-developers.com/index.php"
GOTO MENU2
:SR
ECHO.
START "" "http://www.scottsroms.com/content.php"
GOTO MENU2
:EMB
START "" "http://www.emblwpdesign.com/"
GOTO MENU2
With this code sample and the knowledge you have gained from the previous two tutorials adding your own menus should be a breeze!
As you can see in the code the starting menu label is :MENU
The second menu or main menu is :MENU1
And the third or "credits" menu is :MENU2
In the code you can see the commands used to return users to whatever menu you choose, insert a option that the user can type to go to another menu, etc.
This command is just as before in the above tutorials.
GOTO ????
replacing the ? marks with whichever menu you want. So in example in this tool once a user backs up their apps they are returned to the same menu which is MENU1 after hitting enter.
Another cool thing you can do is have one menu different colors than the others. For instance in this tool the start menu and main menu are blue with white text. The credits menu is black with red text. You can see this command above in the script under :MENU2 as COLOR 04.
A link to the page with different color combinations is located in the OP.
Now for what it looks like:
Start menu:
Main menu:
Credit menu: Sorry my computer screen and cam didnt play nice with the dark theme of this one! Looks good on the pc though.
As usual good luck and if anyone needs help don't hesitate to ask. Also these codes, tools, etc are for everyone to use as they please simple credit is all I ask if you use a portion when designing your own.
Thanks for this now testing it with some stuff for my evo3D
Re: [GUIDE][HOW-TO] Create a windows one click tool!
Flashalot said:
Thanks for this now testing it with some stuff for my evo3D
Click to expand...
Click to collapse
Easy wasnt it!
Note 2 ftw
Re: [GUIDE][HOW-TO] Create a windows one click tool!
Real easy worked like a treat!.
good guide for new users thanks mate
-Rik[Rittik]
R: [GUIDE][HOW-TO] Create a windows one click tool!
Yeah very useful!
Thanks hitted!
Rittik said:
Real easy worked like a treat!.
good guide for new users thanks mate
-Rik[Rittik]
Click to expand...
Click to collapse
GEKTHEBOSS said:
Yeah very useful!
Thanks hitted!
Click to expand...
Click to collapse
Anyone who reads and learns from the ADB/fastboot tutorials can implement those commands here to in the one click tool. Like flashing custom recoveries, boot.img's, etc all will work via the one click tool! Anyway guys don't forget to rate the thread and submit it for news worthiness!
R: [GUIDE][HOW-TO] Create a windows one click tool!
You can also put in op some usefull commands like fastboot reboot,fastboot flash boot boot.img or kernel.elf and also like chmod chown adb etc!
GEKTHEBOSS said:
You can also put in op some usefull commands like fastboot reboot,fastboot flash boot boot.img or kernel.elf and also like chmod chown adb etc!
Click to expand...
Click to collapse
I was thinking about that to but then I thought with all the ADB/fastboot tutorials around here would that be necessary? Hmm maybe Add links in the op to those great tutorials were I learned couldn't hurt! Nice suggestion and I think I will add a few of the more common ones as you mentioned!
R: [GUIDE][HOW-TO] Create a windows one click tool!
eraste said:
I was thinking about that to but then I thought with all the ADB/fastboot tutorials around here would that be necessary? Hmm maybe Add links in the op to those great tutorials were I learned couldn't hurt! Nice suggestion and I think I will add a few of the more common ones as you mentioned!
Click to expand...
Click to collapse
Ok ,2nd post http://forum.xda-developers.com/showthread.php?t=1241935
I am making A hboot flasher almost done to man i love this guide
---------- Post added at 07:10 PM ---------- Previous post was at 07:04 PM ----------
Is there a way to send someone to a web page?
Re: [GUIDE][HOW-TO] Create a windows one click tool!
Flashalot said:
I am making A hboot flasher almost done to man i love this guide
---------- Post added at 07:10 PM ---------- Previous post was at 07:04 PM ----------
Is there a way to send someone to a web page?
Click to expand...
Click to collapse
From the program when running the bat file? Hmm that's a good question id have to look into that. Im sure there is a way.
Note 2 ftw
Re: [GUIDE][HOW-TO] Create a windows one click tool!
eraste said:
From the program when running the bat file? Hmm that's a good question id have to look into that. Im sure there is a way.
Note 2 ftw
Click to expand...
Click to collapse
Ya
One bug left in my hboot flasher
Sent from my HTC VLE_U using Tapatalk 2
Re: [GUIDE][HOW-TO] Create a windows one click tool!
Flashalot said:
Ya
One bug left in my hboot flasher
Sent from my HTC VLE_U using Tapatalk 2
Click to expand...
Click to collapse
Get it worked out?
Note 2 ftw
Re: [GUIDE][HOW-TO] Create a windows one click tool!
eraste said:
Get it worked out?
Note 2 ftw
Click to expand...
Click to collapse
All most I I add
Cls for pages and its not showing the front page
Sent from my HTC VLE_U using Tapatalk 2
Flashalot said:
Ya
One bug left in my hboot flasher
Sent from my HTC VLE_U using Tapatalk 2
Click to expand...
Click to collapse
I knew it was a simple process! To open URL's from the program after the user clicks the bat file simply use this command:
Code:
START "" "yourwebsiteurl"
Voila
R: [GUIDE][HOW-TO] Create a windows one click tool!
You can add also a guide for make a "kitchen" like how to add menus like press 1 to go to recovery flashar and it go to another menu:sly:
GEKTHEBOSS said:
You can add also a guide for make a "kitchen" like how to add menus like press 1 to go to recovery flashar and it go to another menu:sly:
Click to expand...
Click to collapse
Added some basics of this, Creating a simple multi tool with options, etc to post 2.
Thanks a lot! Got my own working Root Tool and Recovery Flasher for my Gnex now.
EDIT: Now it's a multi tool with option to root, flash recovery, flash insecure boot.img,bootani,unlock bootloader, boot to recovery etc. and visit several sites with my mods and ROM on Android-Hilfe.de including "Donate Option"
EDIT 2: Got 3 menus now, it's getting better to change into a fully functional tool.
Man right when you add menu it was back to work
I add my xda profile link
And extra stuff
Disclaimer:
Code:
Though it's really not possible bricking your device due to this tutorial, but still if something or the other happens, I'll 100% try to help you but it's not my responsibility. ThankYou
What you need:
1. ADB drivers and some other files to run the tool, since it will be based on adb. Get from my zip.
2. Notepad++(Search for it)
3. Bit knowledge about ADB to avoid non-sense questions.
4. Kindness to press THANKS button.
Ways to do it:
There are 2 basic ways you can make your tool:
1. To install a specific app.
2. To install all the apps from a folder or directory.
Method 1(Make single apk installer):
1. Open notepad++ and write some codes like this:
Code:
ECHO OFF
CLS
ECHO Single-apk installer.
ECHO Press any key to install your apk.
ECHO.
PAUSE
adb install APP.apk
ECHO Done
ECHO.
2. Now save your script as "name.bat". Here replace name with anything but remember the extension will be ".bat"(obviously without quotes).
Now understading this method:
Here you can practically edit or add anything after the ECHO command. Now here, adb install is the basic command we use to install our apps and replace "APP" with your app name, for e.g. if it's RootBrowser.apk so change APP.apk with that. But remeber your app should be in the same directory as the batch script. But if it is in some other directory, then in adb install APP.apk before APP.apk write the complete location of the folder it is in. For e.g. if it is in C:/test/ the write the code as adb install C:/test/RootBrowser.apk and you're done. But if the folder is in the same directory as the tool is then no need for this. For e.g. the folder is test, then change the code to adb install test/RootBrowser.apk and done!!
Note - The PAUSE command is used to stop the tool at that point.
Method 2(Make multi apk installer):
1. Open notepad++ and write some codes like this:
Code:
ECHO OFF
CLS
ECHO Multi-apk installer.
ECHO Press any key to install your apk.
ECHO.
PAUSE
FOR /r %%f in (*.apk) DO adb install "%%f"
ECHO Done
ECHO.
2. Now save your script as "name.bat". Here replace name with anything but remember the extension will be ".bat"(obviously without quotes).
Now understading this method:
The ECHO and PAUSE parts go same as above. Same goes for directory part, but remember for example if your apps are in same directory as the tool but another folder for e.g. INSTALL, then change the code to FOR /r INSTALL/ %%f in (*.apk) DO adb install "%%f" and you will be good to go
Credits:
Soumya_digi for teaching me
Note- Will add some screenshots soon. Please report if this works for your device and don't forget to press THANKS
Re: [GUIDE] How to make your own APK installer for Windows.
Nice...esp. The second method , however i didn't understand the %% part in the second method clearly.....
Nice work though..!!
Sent from my GT-S5360 using xda app-developers app
Re: [GUIDE] How to make your own APK installer for Windows.
anubhavrev said:
Nice...esp. The second method , however i didn't understand the %% part in the second method clearly.....
Nice work though..!!
Sent from my GT-S5360 using xda app-developers app
Click to expand...
Click to collapse
We use %%ff to target all the apps for multiapps
Press THANKS if I helped,
Best Regards,
AJ
So thecubed made a great tool to root, but the .bat file is intended for PC use. I'm on a Mac.
Could anyone extrapolate the adb commands used in that file? I'm familiar with adb and would have no issues with following the commands, I just can't seem to see exactly what the .bat file does.
tldr: what are the adb commands needed to root using his files? I can take it from there.
I'd love to know as well.
Sent from my VS980 4G using Tapatalk 4
mjdupuis said:
So thecubed made a great tool to root, but the .bat file is intended for PC use. I'm on a Mac.
Could anyone extrapolate the adb commands used in that file? I'm familiar with adb and would have no issues with following the commands, I just can't seem to see exactly what the .bat file does.
tldr: what are the adb commands needed to root using his files? I can take it from there.
Click to expand...
Click to collapse
Here, I put the whole .bat file text, you should be able to figure it out.
@echo off
echo.
echo **************************************
echo Easy root for LG G2
echo Supports ATT, TMO, VZW, and KT Variants
echo Repackaged by IOMonster
echo See http://tinyw.in/mXhw for details
echo **************************************
echo.
echo.
echo Credit to http://optimusforums.com/threads/how-to-root-the-lg-g2-f320.8846/
echo.
echo.
pause
echo Looking for device...
.\adb.exe wait-for-device
echo Determining carrier...
for /f %%i in ('.\adb.exe shell getprop ro.build.target_operator') do set RESULT=%%i
if %RESULT%==ATT GOTO ATTTMORoot
if %RESULT%==TMO GOTO ATTTMORoot
if %RESULT%==VZW GOTO VZWRoot
if %RESULT%==KT GOTO KTRoot
echo.
echo.
echo No matching phone found. Got %RESULT% from ADB.
pause
:ATTTMORoot
echo Found ATT or TMO phone!
echo Pushing g2_security...
echo.
.\adb.exe push g2_security /sdcard/g2_security
GOTO RootStep2
:VZWRoot
echo Found VZW phone!
echo Pushing VZW g2_security...
.\adb.exe push g2_security_vzw /sdcard/g2_security
GOTO RootStep2
:KTRoot
echo Found KT F320k phone!
echo Pushing ytiruces_1a ...
.\adb.exe push ytiruces_1a /sdcard/ytiruces_1a
GOTO RootStep2
:RootStep2
echo.
echo.
echo *******************************************************
echo Now, please unplug usb, go to developer options and
echo disable USB debugging and re-enable it.
echo Once you've done that, re-plug your usb...
echo *******************************************************
pause
echo Waiting for device...
.\adb.exe wait-for-device
echo Now it's time to install su and superuser.
echo.
echo Please note! This will trip LG's rootchecker!
echo.
echo This means your phone will show ROOTED in the settings menu,
echo and in the LG Download mode.
echo.
echo If you do not want to possibly invalidate your warranty
echo press CTRL-C to stop this script.
echo You will have a rooted ADB, but no apps on the phone will be able
echo to access root functions.
echo.
pause
echo.
echo.
echo Mounting system RW and pushing SU, then remounting system RO again
.\adb.exe shell "mount -o remount,rw /system"
.\adb.exe push su /system/xbin/su
.\adb.exe shell "chown 0.0 /system/xbin/su;chmod 06755 /system/xbin/su;sync;mount -o remount,ro /system"
echo Installing superuser
.\adb.exe install superuser.apk
echo.
echo.
echo ***************************************************
echo Done.
echo ***************************************************
echo.
echo Please check the above for any errors and let me know if you run into any issues.
echo Enjoy your phone!
pause
Click to expand...
Click to collapse
wargreymon89 said:
Here, I put the whole .bat file text, you should be able to figure it out.
Click to expand...
Click to collapse
If anyone can't, they don't need to root.
If you know your carrier, skip all the carrier detect crap and go straight to pushing the correct root.
Then wait and push Su and the rest.
It's a pretty simple root via adb manually.
I just want tethering to work before I run out and get one.
Thank you very much!
I'm having trouble getting debug mode on my mac. Any suggestions? SDK Tools are updated and USB Debugging is checked...
Did you select internet and then Ethernet when you connect your USB?
mjdupuis said:
Did you select internet and then Ethernet when you connect your USB?
Click to expand...
Click to collapse
Your a boss!
wargreymon89 said:
Here, I put the whole .bat file text, you should be able to figure it out.
Click to expand...
Click to collapse
By the way, this worked out just fine. I couldn't get it to work the first time around because the original method by thecubed didn't work with the ota. His update worked. Thank you, again.
A Mac root method (not automated)
I posted this in another Q&A thread, just wanted the answer to be available if someone may be following this. The two thread might need to be combined.
WARNING! This is just what worked for me, and it's just the adb commands from thecubed's program. All credit goes to him, I didn't do any of this, just took the info from it.
Here's the thread: http://forum.xda-developers.com/showthread.php?t=2448887
Download it, unzip it, and then take a moment to go back and thank him if you didn't do that.
You are not actually using his program, just the files and commands. Everything is done using Terminal and the Finder. You must have ADB working, look elsewhere for instructions on setting that up.
The files used here are the Verizon versions of the files, which I used for my phone. They are also specific to the OTA'd Verizon software, "11A" so there are different files if you haven't installed the OTA. These commands are correct, but the files being pushed aren't all the same between different carrier models and do not work with any other carrier. All the right stuff for other carriers is contained in thecubed's program.
The bold sections are files you need to send over adb, you can manually enter the file pathway or drag the files from finder into terminal after the adb commands (and before you type the destinations).
One more warning; if this is your first time using adb or terminal, I don't recommend this as your first try. It's super easy to screw something up in terminal.
Your phone must have developer options enabled and usb debugging on. Plug in your phone via usb and select "Internet" and then "Ethernet."
adb push ytiruces_1a_vzw /sdcard/ytiruces_1a
Unplug usb, disable USB debugging and then re-enable it. Plug USB back in.
adb shell "mount -o remount,rw /system"
adb push su /system/xbin/su
adb shell "chown 0.0 /system/xbin/su;chmod 06755 /system/xbin/su;sync;mount -o remount,ro /system"
adb install superuser.apk
exit
I see there are step by step videos for windows but none for Mac yet. I've rooted my last two phones but I followed videos which showed the exact process. I'm hoping someone eventually posts a Mac walk through video for the less confident users such as me.
I'm trying to follow the steps. When I run ./adb devices it lists my phone but says offline next to it. any ideas?
If you're on a Mac there's no "./" just "adb devices". You can't follow the commands in the .bat file without making those adjustments. Did you try following the commands in my post?
black05x5 said:
I'm trying to follow the steps. When I run ./adb devices it lists my phone but says offline next to it. any ideas?
Click to expand...
Click to collapse
You need to be sure USB debugging is on, that you selected Internet>Ethernet when connected to USB, and my phone asked me if I wanted to allow connections from my computer. If all these are set up correctly it should work.
I have usb debugging on. My phone did ask me to confirm connection which I did. Then when I type ./adb devices it lists my phone but still says offline next to it. Being a noob at this I'm really stumped.
mjdupis can you please clarify what you mean when you say I don't need to type ./ before the command? My understanding was I always had to do this on a Mac?
black05x5 said:
mjdupis can you please clarify what you mean when you say I don't need to type ./ before the command? My understanding was I always had to do this on a Mac?
Click to expand...
Click to collapse
The "/" is what you would use to point to a filepath. Like /Home/Library/Root or a file on the phone /System. If you look at the commands I listed there are no ./ before any adb commands, that's a windows thing.
Terminal tells me there's no such directory when I put ./ before adb commands, because it thinks I'm trying to direct it to an adb folder.
I reinstalled everything and now its finally recognizing my phone. Now I just have to figure out how to do this. Sorry to keep asking, but can someone confirm if this is right...
Now that it recognizes my phone
I type adb push then drag the file ytiruces_1a_vzw into terminal and then type /sdcard/ytiruces_1a and hit enter.
Then unplug the cord from phone, turn of debugging and back on then plug the cord back in. then select internet ethernet to activate debugging.
Then type adb shell and hit enter.
Then type mount -o remount,rw /system and hit enter.
Is this correct so far??
thanks for your help!!
---------- Post added at 10:54 PM ---------- Previous post was at 10:15 PM ----------
Actually, looks like I figured it out. Got phone rooted... Thanks again for the help!
Could use your help again! Got my phone rooted and installed TWRP. Everything was working great. Running stock rom. Only mod I had done was the black notification bar. I installed an app from the market called LCD Density. Tried changing my phone from 320 to 300. It then reboots the phone for it to take affect. My phone is now stuck in a bootloop on the LG logo screen with the LED flashing. I can get into TWRP but the problem is I never made a back up or downloaded a rom onto the phone as I hadn't planned to flash any roms. Is there any way I can get a rom onto my phone so I can then flash it in TWRP? I have a Mac.. Thanks for any help...
Got it fixed! Was finally able to connect to my Mac. Then put a rom on the phone using ADB and flashed the rom.