Floating touch screen - Samsung Galaxy SL i9003
I WILL NOT BE HELD RESPONSIBLE FOR ANY DAMAGE CAUSED AFTER DOING THIS
Now we can have a floating screen in our Sl (tested and it works)!
To enabel floating touch screen:
1.go to terminal emilator and write:
su
echo 7005 > /sys/touchscreen/set_touchscreen
cat /sys/touchscreen/set_write
To disabel the floating : (you can just reboot the device) or:
-Write in the terminal emilator:
echo 7025 > /sys/touchscreen/set_touchscreen
cat /sys/touchscreen/set_write
Download Terminal Emulator from Google play:
https://play.google.com/store/apps/...251bGwsMSwxLDEsImphY2twYWwuYW5kcm9pZHRlcm0iXQ..
silentcontrole said:
I WILL NOT BE HELD RESPONSIBLE FOR ANY DAMAGE CAUSED AFTER DOING THIS
Now we can have a floating screen in our Sl (tested and it works)!
To enabel floating screen:
1.go to terminal emilator and write:
su
echo 7005 > /sys/touchscreen/set_touchscreen
cat /sys/touchscreen/set_write
To disabel floating screen: (you can just reboot the device) or:
-Write in the terminal emilator:
echo 7025 > /sys/touchscreen/set_touchscreen
cat /sys/touchscreen/set_write
Download Terminal Emulator from Google play:
https://play.google.com/store/apps/...251bGwsMSwxLDEsImphY2twYWwuYW5kcm9pZHRlcm0iXQ..
Click to expand...
Click to collapse
what exactly do you mean by floating screen and btw thanks for sharing
PS:any screen shot or vid will be enlightening
sounds like he means "floating touch", which has been covered in other threads before.
silentcontrole said:
I WILL NOT BE HELD RESPONSIBLE FOR ANY DAMAGE CAUSED AFTER DOING THIS
Now we can have a floating screen in our Sl (tested and it works)!
To enabel floating screen:
1.go to terminal emilator and write:
su
echo 7005 > /sys/touchscreen/set_touchscreen
cat /sys/touchscreen/set_write
To disabel floating screen: (you can just reboot the device) or:
-Write in the terminal emilator:
echo 7025 > /sys/touchscreen/set_touchscreen
cat /sys/touchscreen/set_write
Download Terminal Emulator from Google play:
https://play.google.com/store/apps/...251bGwsMSwxLDEsImphY2twYWwuYW5kcm9pZHRlcm0iXQ..
Click to expand...
Click to collapse
Looks like this mod/trick is old..
http://forum.xda-developers.com/showthread.php?t=1915158
Sent from my fingers to your face..!
And now there's even an app for that. :silly:
Related
[SCRIPT][v1.4]Bug Reporter (ultimate debugging) -- The MUST debugging AIO tool!
Greetings Hello everyone, I made a script to help developers solve problems and you become a more helpful user. What does it do? It exports to sdcard : dmesg last_kmsg wakelocks kernel version logcat (normal and long) radio (aka modem log) getprop (aka build.prop) running processes partition info mount info RAM info interrupts boot logs from kernels like : nAa, lupus Total maximum possible logs are 14 files. What should I do? :cyclops: Send files from the folder with the time-stamp you have just created or send the tar.gz'ed file to the corresponding developer to help him. Each time you run the script it creates a different folder with a unique time-stamp of the time and date you dumped the logs. Send whatever is needed, everything is in bug_reporter folder. Ok, how do we install this thing? Make sure you download the latest version [ v1.4 is the latest ] which is attached below and put it in your sdcard...and that your device is rooted. Go to CWM recovery and flash it! It does no harm, it just copies a small 6kb file in your /system/xbin. So there is no need to uninstall it later. It will accompany you until you flash a new ROM. If you are coming from another version, just flash it over. If you are having any problems, first attach the debug.txt from bug_reporter folder and tell me your device, kernel and ROM. The problem might be your busybox installation though. Ok, how do we use this thing? Make sure you have a terminal app, I use this : https://play.google.com/store/apps/details?id=jackpal.androidterm Open a terminal app and just type : Code: su bug IT WON'T WORK PROPERLY IF NOT EXECUTED FROM /system/xbin/, SO IT MAY FAIL WITH SCRIPT MANAGER. TRY AND REPORT BACK TO ME. That's it? Yes. :good: If you have any questions, feel free to ask anything. :highfive: Any screenshots? :angel: Yep. { "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" } I want to contribute/redistribute Oh, please do! :victory: Spread it, mod it, rewrite it, make your own version, inform developers, tell ROM cookers to include it, do whatever you want with it, but please don't forget me... Post any improvements or modifications for me here. :fingers-crossed: Here is the "source code" of it: Code: #!/system/bin/sh DIRECTORY="/sdcard/bug_reporter" clear #ROOT CHECK, FOR SCRIPT TO WORK ON ALL su VERSIONS clear echo "Checking root permissions..." if [ "$(id)" != "uid=0(root) gid=0(root)" ]; then echo " - Denied?" echo " * Please accept superuser permission..." echo " /!\ FIRST TYPE: su" echo exit elif [ "$(id)" == "uid=0(root) gid=0(root)" ]; then echo " - Granted! SU binary version : $(su -V)" else echo echo " /!\ Some errors occured... Obviously..." echo " * Run the script again." echo " - Asking superuser permissions..." echo " ( i ) If you see somewhere "root", we are OK," echo " else, we are NOT." su echo " Look at it :" id exit fi { #CREATING THE NEST DIRECTORY # if [ ! -d "$DIRECTORY" ]; then echo " - Directory not found. echo " - Creating... mkdir $DIRECTORY echo " - Done! else echo " - Fatal error! Exiting... exit fi #FOR DEBUGGING REASONS # echo " - SU binary version : $(su -V)" #VACUUM # clear ##SETTING MAX MB if [ ! -f $DIRECTORY/max_mb.txt ]; then echo Logs can easily exceed over the size you can imagine. echo So, I will ask you if you want me to delete them echo in the future. echo echo "How many MB of logs do you want to keep?" echo "(5 MB recommended)" read keep KEEP_KB=$(echo $(($keep*1024)) ) echo $KEEP_KB > $DIRECTORY/max_mb.txt clear fi SIZE=$(du -s $DIRECTORY | cut -f1) MAX_MB=$(cat $DIRECTORY/max_mb.txt) MB=$(echo $(($SIZE/1024)) ) ##CHECKING IF MAX MB ARE REACHED AND PROMPT if [ "$SIZE" -ge "$MAX_MB" ]; then echo Log files have reached the maximum size you have set. echo Their size is around $MB MB. echo echo Do you want to clean all logs? echo "(y = Yes, clean. n = No, reset max MB value)" read clean echo if [ "$clean" == "y" ] || [ "$clean" == "Y" ] || [ "$clean" == "yes" ] || [ "$clean" == "YES" ]; then rm -r $DIRECTORY echo - Cleaned! echo - Re-run the script to set again the max MB value. echo - Bye! exit elif [ "$clean" == "n" ] || [ "$clean" == "N" ] || [ "$clean" == "no" ] || [ "$clean" == "NO" ]; then rm $DIRECTORY/max_mb.txt echo - Value reseted! echo - Re-run the script to set again the max MB value. echo - Continuing... sleep 2 else echo "/!\ Illegal character. Try again..."; sleep 1 exec bug fi fi #PRECALCULATIONS FOR LOGCATING # ls dev/log > $DIRECTORY/devlog MAIN=$(grep main $DIRECTORY/devlog) RADIO=$(grep radio $DIRECTORY/devlog) clear DATETIME=$(date +%Y%m%d%H%M%S) export DATETIME echo " ,-------------, Everything is saved on sdcard" echo " / [email protected] / under bug_reporter folder." echo "/_____________/__,------," echo "| Bug reporter v1.4 / Remember the timestamp!" echo "|_______________,-----' Format : yyyymmddhhmmss" echo echo "It exports and compresses as tarball the following :" echo "* dmesg" echo "* last_kmsg" echo "* wakelocks" echo "* kernel version" echo "* logcat (normal and long)" echo "* radio (aka modem log)" echo "* getprop (aka build.prop)" echo "* running processes" echo "* partition info" echo "* mount info" echo "* RAM info" echo "* interrupts" echo "* boot logs from kernels like : nAa, lupus" echo cd $DIRECTORY #TIMESTAMP WHICH IS THE FOLDER'S NAME WHERE THE FILES ARE SAVED ON EACH RUN echo - report timestamp : $DATETIME mkdir "$DATETIME" echo - exporting... #FOR DMESG echo - dmesg dmesg > $DIRECTORY/"$DATETIME"/dmesg.txt echo - OK! #FOR LAST_KSMG # echo - last_kmsg if [ -f /proc/last_kmsg ]; then cat /proc/last_kmsg > $DIRECTORY/"$DATETIME"/last_kmsg.txt echo - OK! else echo " /!\ last_kmsg not found!"; fi #FOR WAKELOCKS # echo - wakelocks if [ -f /proc/wakelocks ]; then cat /proc/wakelocks > $DIRECTORY/"$DATETIME"/wakelocks.txt echo - OK! else echo " /!\ wakelocks not found!"; fi #FOR KERNEL VERSION # echo - kernel version if [ -f /proc/version ]; then cat /proc/version > $DIRECTORY/"$DATETIME"/kernel.txt uname -a >> $DIRECTORY/"$DATETIME"/kernel.txt echo - OK! else echo " /!\ version not found!"; fi #FOR LOLCATS # if [ "$MAIN" != "main" ] || [ "$RADIO" != "radio" ]; then echo " /!\ main and radio logging aborted!"; echo "* I can't logcat properly, loggers may be disabled." echo "- Your ROM's dev must have disabled it via a script." echo " OR" echo "- Loggers are disabled from kernel." else ##MAIN echo - logcat logcat -d > $DIRECTORY/"$DATETIME"/logcat.txt echo - OK! echo - long logcat logcat -v long -d > $DIRECTORY/"$DATETIME"/long_logcat.txt echo - OK! ##RADIO echo - radio logcat -b radio -v time -d > $DIRECTORY/"$DATETIME"/radio.txt echo - OK! fi #FOR GETPROP # echo - getprop getprop > $DIRECTORY/"$DATETIME"/getprop.txt echo - OK! #FOR RUNNING PROCESSES # echo - processes ps > $DIRECTORY/"$DATETIME"/processes.txt echo - OK! #FOR PARTITION INFO # echo - partition info df > $DIRECTORY/"$DATETIME"/partitions.txt echo - OK! #FOR MOUNTS # echo - mount info mount > $DIRECTORY/"$DATETIME"/mounts.txt echo - OK! #FOR RAM # echo - RAM info free > $DIRECTORY/"$DATETIME"/ram.txt echo - OK! #FOR INTERRUPTS # echo - interrupts cat /proc/interrupts > $DIRECTORY/"$DATETIME"/interrupts.txt echo - OK! ##----DEVIDER FOR SPECIAL LOGS----## #BOOT LOG FOR nAa KERNELS AND DERIVATIVES # if [ -f "/boot.txt" ]; then echo " ( i ) Oh, I found a boot log too!" echo "- That's found on some nAa kernels, backing it up." cat /boot.txt > $DIRECTORY/"$DATETIME"/boot.txt echo - OK! fi #BOOT LOG FOR lupus KERNELS AND DERIVATIVES # if [ -f "/tmp/lupus.log" ]; then echo " ( i ) Oh, I found a boot log too!" echo "- That's found on some lupus kernels, backing it up." cat /tmp/lupus.log > $DIRECTORY/"$DATETIME"/boot.txt echo - OK! fi ##----###----## #CLEANING UP UNEEDED FILES FOR USER # echo - Cleaning up... ##CLEANING LAST TARBALL rm *.tar.gz 2>&1 | >$DIRECTORY/devlog ##devlog IS A FILE OF PRECALCULATIONS FOR LOGCAT if [ -f "$DIRECTORY/devlog" ]; then rm $DIRECTORY/devlog fi #COMPRESSING FOR EASY SENDING # echo - Compressing logs... echo - Done! echo " ( i ) Send "$DATETIME".tar.gz to developer(s)!" tar -zcf "$DATETIME".tar.gz "$DATETIME" echo - Exiting... #ADVERTISING THE SCRIPT # echo "http://forum.xda-developers.com/showthread.php?p=41107818" > $DIRECTORY/"$DATETIME"/"I used bug_reporter script.txt" #DEBUGING MY SCRIPT # } 2>&1 | tee $DIRECTORY/debug.txt exit
CHANGELOG Code: [B]v1.4[/B] [B][COLOR="Red"]MORE FEATURES[/COLOR][/B]-[COLOR="SeaGreen"]WORKS ON ALL SUPERUSER APPS[/COLOR] - alternative root check - now it's [B]not[/B] necessary to have SuperSU, you can use whatever you want, but you have to type [B]su[/B] first - added additional logging of : [B]running processes[/B], [B]partition info[/B], [B]mount info[/B], [B]RAM info[/B], [B]interrupts[/B], [B]boot logs[/B] from [B]lupus[/B] kernel - avoided potential bug with radio logging - added some more info about kernel version logging (with [B]uname -a[/B] command) - code clean up and more easier to follow - faster? (it takes 1 second for me) [B]v1.3[/B] [B][COLOR="Red"]ROCK STABLE[/COLOR][/B]-[COLOR="SeaGreen"]THE BEST[/COLOR] - corrected root check - added compatibility with CM10.1, it uses an older version of su and the script will ask you to install SuperSU to update it - corrected and re-ordered some text - optimized script speed by removing unnecessary su requests (it just takes 3 secs to finish) - added build.prop backup with getprop command, it will help devs understand more info about your situation - added some sort of advertisement of the script, so that it'll become popular - added compression of the last logging folder, so that you can easily send it to dev(s) - added more info on the script, made more presentable and explanatory for those who are willing to modify it [B]v1.2[/B] [B][COLOR="Red"]STABLE[/COLOR][/B]-[COLOR="SeaGreen"]FULLY TESTED[/COLOR] - finally fixed logcat exporting, now it will work for sure, fully tested - cleaned up the script a lot and made it simplier for reading - added radio (aka modem log), wakelocks and kernel version logging - fixed terminal output logging for debugging better [B]v1.1[/B] [I][COLOR="Gray"]it won't logcat, but everything else works[/COLOR][/I] - fixed wrong logcat exporting, now when it's disabled, you'll know it - added an auto-check for vaccuming logs after reaching above the MB size you set (logs can easily reach 10 MB) - small bugfixes - root check, in order to be sure we collect logs as root - terminal output logging for debugging reasons [B]v1.0 beta[/B] [I][COLOR="Gray"]works, but has many errors, it may even fail to flash.[/COLOR][/I] - initial release
Thank you very much, this script will help a lot of people, including me Sent from my R800i using xda premium
Is it possible to move this bug file to system/xbin instead of flashing it (gives error). And if yes, what should be the permissions?
zadrozny91 said: Is it possible to move this bug file to system/xbin instead of flashing it (gives error). And if yes, what should be the permissions? Click to expand... Click to collapse It's fixed. Just flash bug_reporter[v1.0]-nAa.zip, the permissions are 755. If you are unsure about permissions, see this : http://www.draac.com/chmodchart.html But I am telling you to flash the fixed zip, it'll work.
leajian said: It's fixed. Just flash bug_reporter[v1.0]-nAa.zip, the permissions are 755. If you are unsure about permissions, see this : http://www.draac.com/chmodchart.html But I am telling you to flash the fixed zip, it'll work. Click to expand... Click to collapse nice concept ,,but there are some problems after taking log both lastkmsg and logcat file show nothing(empty files) long logcat shows this: 9 com.android.settings only dmesg is correctly extracted
UPDATE! Code: [B]v1.1[/B] - fixed wrong logcat exporting, now when it's disabled, you'll know it - added an auto-check for vaccuming logs after reaching above the MB size you set (logs can easily reach 10 MB) - small bugfixes - root check, in order to be sure we collect logs as root - terminal output logging for debugging reasons
Thanks man, I was going to write something similar until I found this. I cannot attest to the zip's functionality as I use it with script manager, but I can say version 1.0 worked perfectly (producing the three possible proper log files) for me. Version 1.1 not so much it tells me 'I can't logcat' when I clearly can; gl with your 'main not found' problem. Also a suggestion maybe include in your zip a copy of the script that goes to /sdcard/ so the user can easily access it in order to facilitate using it as a widget.
defiant07 said: Thanks man, I was going to write something similar until I found this. I cannot attest to the zip's functionality as I use it with script manager, but I can say version 1.0 worked perfectly (producing the three possible proper log files) for me. Version 1.1 not so much it tells me 'I can't logcat' when I clearly can; gl with your 'main not found' problem. Also a suggestion maybe include in your zip a copy of the script that goes to /sdcard/ so the user can easily access it in order to facilitate using it as a widget. Click to expand... Click to collapse Indeed, logcating won't work no matter what. It's a bug. I am aware of it. I'll fix it today I guess along with some code cleanup and considering your suggestion. Sent from my MT11i using xda premium
Code: [B]v1.2[/B] [B][COLOR="Red"]STABLE[/COLOR][/B]-[COLOR="SeaGreen"]FULLY TESTED[/COLOR] - finally fixed logcat exporting, now it will work for sure, fully tested - cleaned up the script a lot and made it simplier for reading - added radio (aka modem log), wakelocks and kernel version logging - fixed terminal output logging for debugging better Also v1.0 beta re-added in case you want it.
Might convert this to external scripts for windows and unix as well. Btw, why the root checker? If it needs to be in system/xbin then you already have root Sent from my Nexus 7 using Tapatalk HD
cybojenix said: Might convert this to external scripts for windows and unix as well. Btw, why the root checker? If it needs to be in system/xbin then you already have root Sent from my Nexus 7 using Tapatalk HD Click to expand... Click to collapse :victory: Yeah, do whatever you want with it! About the root check... Have you ever thought of "just in case" case? Well sometimes sh!t happens... Like the 7+7=16 embarrassing situation on final exams for example. Anyway, probably won't need this check on other unix systems... You'll need to start the script with Code: sudo -i and remove any Code: su -c in the script. Also some logging files are available only for android, like logcat and logcat radio. If you need any help with converting I can help you both for windows and unix, just PM me. EDIT : Opss, root check is buggy, I've discovered it thanks to you! I'll upload a fixed minor revision later.
leajian said: :victory: Yeah, do whatever you want with it! About the root check... Have you ever thought of "just in case" case? Well sometimes sh!t happens... Like the 7+7=16 embarrassing situation on final exams for example. Anyway, probably won't need this check on other unix systems... You'll need to start the script with Code: sudo -i and remove any Code: su -c in the script. Also some logging files are available only for android, like logcat and logcat radio. If you need any help with converting I can help you both for windows and unix, just PM me. EDIT : Opss, root check is buggy, I've discovered it thanks to you! I'll upload a fixed minor revision later. Click to expand... Click to collapse I mean set up a script to run from a pc to debug android. Let's you run it on non rooted devices (parts of it anyway) It's quicker than getting a user to push and run via the android terminal (which not everyone has) Easier to run via an adb interface which can be supplied, and implement an update script everyone is running the same version Btw won't need help check my signature for the root scripts Sent from my Nexus 7 using Tapatalk HD
UPDATE! The tool is now in a super stable state of development. Code: [B]v1.3[/B] [B][COLOR="Red"]ROCK STABLE[/COLOR][/B]-[COLOR="SeaGreen"]THE BEST[/COLOR] - corrected root check - added compatibility with CM10.1, it uses an older version of su and the script will ask you to install SuperSU to update it - corrected and re-ordered some text - optimized script speed by removing unnecessary su requests (it just takes 3 secs to finish) - added build.prop backup with getprop command, it will help devs understand more info about your situation - added some sort of advertisement of the script, so that it'll become popular - added compression of the last logging folder, so that you can easily send it to dev(s) - added more info on the script, made more presentable and explanatory for those who are willing to modify it
can i get permission for adding your script in my cm-10.1 for LG-P350 ?
PecanCM said: can i get permission for adding your script in my cm-10.1 for LG-P350 ? Click to expand... Click to collapse Says in the post you can. Just credit Sent from my Nexus 7 using Tapatalk HD
Just sharing. I use this: bugreport > /sdcard/bug_report_`date +"%Y%m%d-%H%M"` You may want to incorporate it in some way. Sent from my GT-I9100 using xda premium
RovG said: Just sharing. I use this: bugreport > /sdcard/bug_report_`date +"%Y%m%d-%H%M"` You may want to incorporate it in some way. Sent from my GT-I9100 using xda premium Click to expand... Click to collapse Thanks, I'll have it in mind, the reason why I didn't do this before is that I wanted it to be simple and not so informative. In next update I might add some colors too! Anyway here is an update... :fingers-crossed: Code: [B]v1.4[/B] [B][COLOR="Red"]MORE FEATURES[/COLOR][/B]-[COLOR="SeaGreen"]WORKS ON ALL SUPERUSER APPS[/COLOR] - alternative root check - now it's [B]not[/B] necessary to have SuperSU, you can use whatever you want, but you have to type [B]su[/B] first - added additional logging of : [B]running processes[/B], [B]partition info[/B], [B]mount info[/B], [B]RAM info[/B], [B]interrupts[/B], [B]boot logs[/B] from [B]lupus[/B] kernel - avoided potential bug with radio logging - added some more info about kernel version logging (with [B]uname -a[/B] command) - code clean up and more easier to follow - faster? (it takes 1 second for me)
[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
How to properly use Terminal Emulator shortcut widget commands?
Hello! I want to create a homescreen widget shortcut for Terminal Emulator to do the following command line: Code: killall -9 mediaserver To do so, I created a sh file type with the following lines and moved it to /system dir with rwxrwxrwx permissions: Code: #!/system/bin/sh su killall -9 mediaserver exit exit And then created a widget with Term shortcut with this text on argument window: Code: su -c "sh /system/camscript.sh" The problem is: When I select the Terminal Icon on my homescreen, it open the terminal emulator appears Code: [email protected]:/ $ su -c "sh /system/camscript.sh" [email protected]:/ # The thing is that I want it to execute the command and exit the terminal emulator prompt by itself. Can anyone help me? Thanks
Please! Someone??
teforeon said: Code: #!/system/bin/sh su killall -9 mediaserver exit exit And then created a widget with Term shortcut with this text on argument window: Code: su -c "sh /system/camscript.sh" The problem is: When I select the Terminal Icon on my homescreen, it open the terminal emulator appears Code: [email protected]:/ $ su -c "sh /system/camscript.sh" [email protected]:/ # The thing is that I want it to execute the command and exit the terminal emulator prompt by itself. Click to expand... Click to collapse Thanks for your command example. It works for me and I can live with the disadvantage that the "Terminal Emulator" does not close after command execution. In my case I need even a running "Terminal Emulator" before I can run the "Term shortcut" although the "Term shortcut" opens a "Terminal Emulator"-window (strange ). By the way you have written "#!/system/bin/sh" . In my case it is enough to write just "#!/bin/sh"
schnick_schnack said: Thanks for your command example. It works for me and I can live with the disadvantage that the "Terminal Emulator" does not close after command execution. In my case I need even a running "Terminal Emulator" before I can run the "Term shortcut" although the "Term shortcut" opens a "Terminal Emulator"-window (strange ). By the way you have written "#!/system/bin/sh" . In my case it is enough to write just "#!/bin/sh" Click to expand... Click to collapse Hhaha yes, I seem to have to open it too. But the command not always works for what I need anymore (reset camera on custom firmware).
I know that I'm a little late to the party but, why not use "am force-stop jackpal.androidterm" at the end of your script. This kills the terminal emulator app.
bamoka said: I know that I'm a little late to the party but, why not use "am force-stop jackpal.androidterm" at the end of your script. This kills the terminal emulator app. Click to expand... Click to collapse I am even later to the party LOL Your am force command did not work for me as it says that I need special permissions to force close an app What did work is to add a "&& exit" e.g. Code: su -c "sh /system/camscript.sh" && exit
busybox ls --color and many other commands "Working"
have you got bored of your one Text colored terminal ? when you look at the results you always are confused ? well .. you came into the right thread I'm here today to show you how to make every busybox command fully functional I was trying to make this command work but no success Code: #ls --color=always then i ended up making busybox fully functional Note: you must have rooted device and custom recovery and SDK tools " incase you don't have adb.rar "and your phone developer mode and USB debugging checked . go to your SDK tools press sheft and right mouse click and open cmd here ________________________________________________________________________ now .. lets get to it shall we ? 1 - reboot into recovery and connect your device in your PC 2 - type in these commands in your PC command prompt you opened in order : Code: # adb shell # mount system # cp /system/bin/sh /sdcard/Download/sh #adb reboot 3 - reboot your device 4 - download this busybox app and start it jrummy.busybox.installer 5 - you'll see in the app's INSTALLER icon a location /system/xbin change it to /system/bin 6 - open app's settings "upper right corner beside the three dot's" and check all what's in the installer settings 7 - press back and click install " your phone will boot into recovery and install the busybox " 8 - after finishing the process your device will reboot normally but wait a minute !!! SU is not working anymore :crying: 9 - reboot your device again into recovery !! " I'll try to fix it for you " 10 - type in these commands in order : Code: #adb shell #mount system #cp /sdcard/Download/sh /system/bin/sh #chmod 755 /system/bin/sh #adb reboot and we are done look at the attachment below this is how your terminal will look like and error free
I'm sorry about this post apparently I was kinda mistaken I think what happens that lead to this is when you write down the applet's name in terminal the device start to search inside bin file first .. if the applet was not found in bin . the device will start to search on xbin file and maybe the whole storage for that command so .. since there are some applets in bin are the same one in busybox and I was able to locate them "took me like an hour to do so" and these applets are : Code: [COLOR="blue"]blkid brctl cat chmod chown clear cmp cp date dd df dmesg du grep gzip hd id ifconfig insmod ionice ip kill ln ls lsmod lsof mkdir mke2fs mknod mkswap mount mv netstat nohup ping ping6 printenv ps readlink reboot renice rm rmdir rmmod route sh sleep swapoff swapon sync top touch tune2fs umount uptime[/COLOR] there are a lot of difference in results between the factory applets and the busybox applets if you want to see the difference install busybox in /system/xbin and in terminal type one of these applets above like this : for busybox applets result : Code: busybox [I][COLOR="blue"]applet[/COLOR][/I] for system applets result : Code: [I][COLOR="Blue"]applet[/COLOR][/I] it might not be a new thing but for me it is I just wanted to share that info for the ones who doesn't know Edit : there is also one applet in system/xbin which is " nc " thanks .