Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hello everyone first sorry for my bad english

I`m a beginner of batch script and I like to use it to many things for example
I need the bat script to put files to android phone for example galaxy
I need put files to system and replace system file no problem with root or no
and I tried to use some command but i can`t pass :(

I used same command on bat but when the permission was changes my script was stopped

I used this commands

@ECHO OFF

echo Android Chmod changer Tool											
pause.
goto menu


:menu									
cls
echo.
echo.
echo.       = Menu =
echo.
echo.
echo   [1] chek device											
echo   [2] go to device
echo   [3] Root pirmission
echo.
echo   [4] go to directory
echo   [5] pirmission chnge bootsamsung.qmg
echo   [6] pirmission chnge bootsamsungloop.qmg
echo.
echo.
echo.
set /p choice= Enter your number:

if '%choice%'=='1' goto chek device
if '%choice%'=='2' goto go to device
if '%choice%'=='3' goto Root pirmission
if '%choice%'=='4' goto go to directory
if '%choice%'=='5' goto pirmission chnge bootsamsung.qmg
if '%choice%'=='6' goto pirmission chnge bootsamsungloop.qmg

goto menu																

________________________________________________________

:chek device
cls
echo.
echo Your device will cheked									
echo.
pause

adb.exe devices

pause
goto menu
________________________________________________________

:go to device													 
cls 														
echo.
echo.
echo.					
pause

adb.exe shell

pause
goto menu													
________________________________________________________

:Root pirmission
cls
echo.
echo.
echo.
pause

adb.exe su

pause
goto menu
________________________________________________________


:go to directory
cls
echo.
echo.
echo.
pause

adb.exe cd system/media

pause
goto menu
___________________________________________

:pirmission chnge bootsamsung.qmg
cls
echo.
echo.
echo.
pause

adb.exe chmod 775 bootsamsung.qmg

pause
goto menu
________________________________________________________

:pirmission chnge bootsamsungloop.qmg
cls
echo.
echo.
echo.
pause

adb.exe chmod 775 bootsamsungloop.qmg

pause
goto menu									

________________________________________________________



and when I manually use the commands I can`t change chmod or delete any system file
please help me
thanks
Posted
Updated 4-Jan-16 21:35pm
v3
Comments
Dave Kreskowiak 4-Jan-16 22:04pm    
Your entire "script" only runs commands using ADB, whatever that is. If it doesn't work, the problem is not your script, not with the functionality of ADB. That's something we can't help you with. You'll have to go back to the people you got this ADB tool from and ask them about it.
KoSraT GraPhiC 5-Jan-16 3:42am    
i created it with commands no one helped me please tell me what i do
Richard MacCutchan 5-Jan-16 3:53am    
ADB is the Android Debug Bridge which allows you command level access to the Android OS (Linux) from the connected PC.
Richard MacCutchan 5-Jan-16 3:54am    
You should run individual commands in isolation and tell us exactly what happens, and what error messages you see.
KoSraT GraPhiC 5-Jan-16 14:27pm    
thank you richard
when i run my script my script work fine
http://i.imgur.com/B8pdEco.jpg

and when i do any things work fine
http://i.imgur.com/3hBzy06.jpg

http://i.imgur.com/tZTzZaB.jpg

this is my script
but when i go to step 2 my script don`t work fine
http://i.imgur.com/JnE23Co.jpg
my script won`t go back for next steps
http://i.imgur.com/pBmxe4y.jpg
please help me thankyou alot

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900