So... I don't know how to make ROMs, or update.zips.... but I can make batch files!! HAHA
Basically, all this does is help noobies out by doing everything for you.
This is intended for use with FreshToast, but should work with any ROM really (JIT functionality depends on if the ROM supports it and editing the build.prop file, read below)
{
"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"
}
What it does
JIT does NOT like Sense UI. You basically can't use Sense UI with JIT... so this will remove Sense UI then enable JIT.
You can read about JIT here: http://en.wikipedia.org/wiki/Just-in-time_compilation
This will remove all HTC Widgets, Rosie, and any other useless SenseUI applications. (as they don't work with other launchers) and push over the Helix Launcher. Also, this will enable JIT (there is an option to enable or not to, as well as automated enable/disable JIT)
I have also included the HTC Ringtone trimmer apk - its honestly the best ringtone trimmer I've used, and works great, alot of devs take it out. I dont know why.
Also Ive included the genie news and weather widget.
I get no force closes with this method from removing sense, but as with most roms with JIT enabled, there is the occasional freeze.
As always, DO A NANDROID BACKUP FIRST!!!
The build.prop file is ROM SPECIFIC!!
The script has the build.prop for FRESHTOAST 1.1
I'm working on getting multiple build.prop's from other ROMs so you will only have to make a simple menu selection.
If you are using a different ROM do the following:
adb pull /system/build.prop C:/system.prop_jit
edit the file in WORDPAD (not notepad) and save as build.prop_jit in the "Unicode Text Format"
Go to the very last line of the file, and add the following line:
Code:
dalvik.vm.execution-mode=int:jit
Save the file as build.prop to the location you extracted the zip (no_sense.zip) to and overwrite the old one.
The rest remains the same.
Special thanks to regaw_leinad for the help with the script. THANK YOU!! also thanks to Jus10o for helping me with the force closes I was getting after removing sense. Thanks also to "gunnyman" for the hosting of the file!
Instructions:
First thing is something some of you may already have done. This will enable adb to be run in the DOS command line from anywhere, not just your android tools folder.
Right click on "My Computer"
Click Properties
Click the advanced tab
Click "Environment Variables"
In the top window click "PATH"
Click "Edit"
Change the "Variable Value" to your android SDK tools folder (Mine is C:\Android\tools)
Now unzip the no_sense folder anywhere you want.
Connect your phone via USB and make sure you DO NOT have the phone in disk mode, select "Charge Only" and ensure the phone has USB-Debugging on (should be by default)
Double click on "no_sense.bat" and follow the prompts.
The first time you enable JIT it will create a backup of your old files, and can be restored/disabled later.
NOTICE You MUST change your home screen wall paper to a non-htc wallpaper before enabling JIT. If not, your phone will freeze on boot. Any photo will do, as long as it is not a HTC wallpaper. I'm looking in to how to prevent this from happening. If you accidentally booted without changing, just nandroid back and do it again. After stripping the ROM of Sense UI, and starting Helix, change your wallpaper, THEN enable JIT.
Currently v1.2
Download Here: http://dl.dropbox.com/u/6718465/no_sense_with_apks.zip 9.40MB (Includes all the backed up Rosie APKs)
Without APKs: http://dl.dropbox.com/u/6718465/no_sense.zip 1.75MB
I'm curious to try it on the new ZenExp ROM. Helix launcher already works great with it.
Well the Sense UI strip part works....
Having some trouble with the JIT part...
I guess some commands can't be done though ADB Shell
are you using ADB to execute a script? if so make sure you chmod that script. adb shell chmod 755 /sdcard/nameofscript should do the trick.
gunnyman said:
are you using ADB to execute a script? if so make sure you chmod that script. adb shell chmod 755 /sdcard/nameofscript should do the trick.
Click to expand...
Click to collapse
I think it's a .bat file to run on the computer w/ your phone plugged in.
poor_red_neck said:
Well the Sense UI strip part works....
Having some trouble with the JIT part...
I guess some commands can't be done though ADB Shell
Click to expand...
Click to collapse
can you send me the script, I'll take a look at it and see whats goin on.
When I saw the howto for enabling JIT I wrote a script that would execute the list of shell commands. All I had to do was edit build prop manually then execute the script. I also wrote an undo script. I can easily redo it for you if it will help.
This is an excellent contribution. Thanks. I see many firsts much less worthy of posting(aka-why is this posteds) Also, damage put dcconfig.apk in the new .08 rom which allows for you to enable/disable jit and many other options from within a checkbox.
Ah, Found the issue...
I'm doing everything through adb shell xxxcommandxxx for JIT...
However I dont know how to get SU through the shell...
Here's part of it Ive stripped out.
Code:
@ECHO OFF
adb remount
adb shell mkdir /sdcard/JIT
adb shell mkdir /sdcard/dalbk
adb shell mkdir /sdcard/JIT/bin
adb push libdvm.so /sdcard/JIT/libdvm.so
adb push libnativehelper.so /sdcard/JIT/libnativehelper.so
adb push dalvikvm /sdcard/JIT/bin/dalvikvm
adb pull /system/build.prop build.prop_backup
adb push build.prop_JIT /system/build.prop
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock6 /system
adb shell cp /system/build.prop /sdcard/dalbk/
adb shell cp /system/bin/dalvikvm /sdcard/dalbk/
adb shell cp /system/lib/libdvm.so /sdcard/dalbk/
adb shell cp /system/lib/libnativehelper.so /sdcard/dalbk
adb shell cd /sdcard/jit/bin
adb shell cp -f dalvikvm /system/bin
adb shell busybox chmod 755 /system/bin/dalvikvm
adb shell cd /sdcard/jit
adb shell cp -f libdvm.so /system/lib/
adb shell cp -f libnativehelper.so /system/lib/
adb shell cat.build.prop >/system/build.prop
adb shell chmod 644 /system/lib/libdvm.so
adb shell chmod 644 /system/lib/libnativehelper.so
adb shell chmod 666 /system/build.prop
adb shell sync
I get an error at trying to chmod 755 /system/bin/dalvikvm
do adb remount first.
Here's the full script if you're interested... again... the strip sense part works fine, JIT is giving me issues.
Code:
@Echo OFF
Echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
Echo º º
Echo º º
Echo º º
Echo º PLEASE ENSURE YOU HAVE CREATED A NANDROID BACKUP FIRST!!!! º
Echo º ALSO: Please ensure you have installed some sort of Home º
Echo º Launcher First. This script will install º
Echo º Helix launcher by default º
Echo º º
Echo º Also please ensure you have already installed º
Echo º A2SD º
Echo º º
Echo º Press 3 at the following option to skip º
Echo º to enabling/disabline JIT º
Echo º º
Echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
SET /P ANSWER=Have you created a Nandroid Backup first? (1)Yes (2)No =
if /i {%ANSWER%}=={1} (goto :10)
if /i {%ANSWER%}=={2} (goto :20)
if /i {%ANSWER%}=={3} (goto :50)
:10
Echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
Echo º º
Echo º The script will now pull and backup your Sense/Rosie apks. º
Echo º They will be placed in the folder labeled "Rosie_Backup" º
Echo º In the "Root" directory of your PC(C:/Rosie_Backup º
Echo º º
Echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
pause
adb remount
adb pull /system/app/Rosie.apk /Rosie_Backup/Rosie.apk
adb pull /system/app/HtcLockScreen.apk /Rosie_Backup/HtcLockScreen.apk
adb pull /system/app/com.android.launcher2.apk /Rosie_Backup/com.launcher2.apk
adb pull /system/app/com.htc.MusicWidget.apk /Rosie_Backup/com.htc.MusicWidget.apk
adb pull /system/app/com.htc.TwitterWidget.apk /Rosie_Backup/com.htc.TwitterWidget.apk
adb pull /system/app/com.htc.WeatherWidget.apk /Rosie_Backup/com.htc.WeatherWidget.apk
adb pull /system/app/HtcAddProgramWidget.apk /Rosie_Backup/HtcAddProgramWidget.apk
adb pull /system/app/htcmailwidgets.apk /Rosie_Backup/htcmailwidgets.apk
adb pull /system/app/htcmsgwidgets.apk /Rosie_Backup/htcmsgwidgets.apk
adb pull /system/app/HtcWeatherWallpaper.apk /Rosie_Backup/htcWeatherWallpaper.apk
adb pull /system/app/SetupWizard.apk /Rosie_Backup/SetupWizard.apk
Echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
Echo º º
Echo º Now we will install Helix Launcher º
Echo º to the /system/app folder º
Echo º and push other nescessary files º
Echo º as well as remove the non-essential º
Echo º HTC applications/Widgets º
Echo º º
Echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
Echo You will get a force close on the phone, click force close
pause
adb push com.helixproject.launcher.apk /system/app/com.helixproject.launcher.apk
adb push GenieWidget.apk /system/app/GenieWidget.apk
adb push HtcRingtoneTrimmer.apk /system/app/HtcRingtoneTrimmer.apk
adb push com.htc.resources.apk /system/framework/com.htc.resources.apk
adb shell rm /system/app/Rosie.apk
adb shell rm /system/app/HtcLockScreen.apk
adb shell rm /system/app/com.android.launcher2.apk
adb shell rm /system/app/com.htc.MusicWidget.apk
adb shell rm /system/app/com.htc.TwitterWidget.apk
adb shell rm /system/app/com.htc.WeatherWidget.apk
adb shell rm /system/app/HtcAddProgramWidget.apk
adb shell rm /system/app/htcmailwidgets.apk
adb shell rm /system/app/htcmsgwidgets.apk
adb shell rm /system/app/HtcWeatherWallpaper.apk
adb shell rm /system/app/SetupWizard.apk
:50
Echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
Echo º º
Echo º Now we can enable JIT º
Echo º (Just In Time compiler) º
Echo º º
Echo º º
Echo º If you are unsure, please search on XDA Forums First º
Echo º º
Echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
SET /P ANSWER=Would you like to enable/disable JIT? (1)Yes (2)No =
if /i {%ANSWER%}=={1} (goto :51)
if /i {%ANSWER%}=={2} (goto :100)
:51
SET /P ANDWER=Press 1 to enable JIT - Press 2 to disable JIT =
if /i {%ANSWER%}=={1} (goto :52)
if /i {%ANSWER%}=={2} (goto :53)
:52
adb remount
adb shell mkdir /sdcard/JIT
adb shell mkdir /sdcard/dalbk
adb shell mkdir /sdcard/JIT/bin
adb push libdvm.so /sdcard/JIT/libdvm.so
adb push libnativehelper.so /sdcard/JIT/libnativehelper.so
adb push dalvikvm /sdcard/JIT/bin/dalvikvm
adb pull /system/build.prop build.prop_backup
adb push build.prop_JIT /system/build.prop
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock6 /system
adb shell cp /system/build.prop /sdcard/dalbk/
adb shell cp /system/bin/dalvikvm /sdcard/dalbk/
adb shell cp /system/lib/libdvm.so /sdcard/dalbk/
adb shell cp /system/lib/libnativehelper.so /sdcard/dalbk
adb shell cd /sdcard/jit/bin
adb shell cp -f dalvikvm /system/bin
adb shell busybox chmod 755 /system/bin/dalvikvm
adb shell cd /sdcard/jit
adb shell cp -f libdvm.so /system/lib/
adb shell cp -f libnativehelper.so /system/lib/
adb shell cat.build.prop >/system/build.prop
adb shell chmod 644 /system/lib/libdvm.so
adb shell chmod 644 /system/lib/libnativehelper.so
adb shell chmod 666 /system/build.prop
adb shell sync
Echo The phone will now reboot...
adb reboot
:53
adb remount
adb shell cd /sdcard/dalbk/
adb shell cat build.prop >/system/build.prop
adb shell cp -f dalvikvm /system/bin
adb shell busybox chmod 755 /system/bin/dalvikvm
adb shell cp -f libdvm.so /system/lib/
adb shell cp -f libnativehelper.so /system/lib/
adb shell chmod 644 /system/lib/libdvm.so
adb shell chmod 644 /system/lib/libnativehelper.so
adb shell chmod 666 /system/build.prop
adb shell sync
ECHO Your phone will now reboot...
adb reboot
exit
:20
SET /P ANSWER=Would you like to reboot into recovery now to create one? (1)Yes (2)No =
if /i {%ANSWER%}=={1} (goto :101)
if /i {%ANSWER%}=={2} (goto :100)
:101
pause
Echo Your phone is now rebooting into recovery...
adb reboot recovery
exit
:100
pause
exit
I literally haven't messed with batch files since I was like... 12... soo.... haha.
poor_red_neck said:
Ah, Found the issue...
I'm doing everything through adb shell xxxcommandxxx for JIT...
However I dont know how to get SU through the shell...
Here's part of it Ive stripped out.
Code:
@ECHO OFF
adb remount
adb shell mkdir /sdcard/JIT
adb shell mkdir /sdcard/dalbk
adb shell mkdir /sdcard/JIT/bin
adb push libdvm.so /sdcard/JIT/libdvm.so
adb push libnativehelper.so /sdcard/JIT/libnativehelper.so
adb push dalvikvm /sdcard/JIT/bin/dalvikvm
adb pull /system/build.prop build.prop_backup
adb push build.prop_JIT /system/build.prop
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock6 /system
adb shell cp /system/build.prop /sdcard/dalbk/
adb shell cp /system/bin/dalvikvm /sdcard/dalbk/
adb shell cp /system/lib/libdvm.so /sdcard/dalbk/
adb shell cp /system/lib/libnativehelper.so /sdcard/dalbk
adb shell cd /sdcard/jit/bin
adb shell cp -f dalvikvm /system/bin
adb shell busybox chmod 755 /system/bin/dalvikvm
adb shell cd /sdcard/jit
adb shell cp -f libdvm.so /system/lib/
adb shell cp -f libnativehelper.so /system/lib/
adb shell cat.build.prop >/system/build.prop
adb shell chmod 644 /system/lib/libdvm.so
adb shell chmod 644 /system/lib/libnativehelper.so
adb shell chmod 666 /system/build.prop
adb shell sync
I get an error at trying to chmod 755 /system/bin/dalvikvm
Click to expand...
Click to collapse
try taking out "busybox", because if it is installed in the rom and symlinked you don't need to type that.
Now I get the following error:
cp: cannot stat 'dalvikvm': No such file or direcotry
cp: cannot stat 'libdvm.so': No such file or directory
cp: cannot stat 'libnativehelper.so': No such file or directory
The system cannot find the path specified.
poor_red_neck said:
Now I get the following error:
cp: cannot stat 'dalvikvm': No such file or direcotry
cp: cannot stat 'libdvm.so': No such file or directory
cp: cannot stat 'libnativehelper.so': No such file or directory
The system cannot find the path specified.
Click to expand...
Click to collapse
thats because you didn't define where to copy them from... where are you copying those from? put the path before the files
regaw_leinad said:
thats because you didn't define where to copy them from... where are you copying those from? put the path before the files
Click to expand...
Click to collapse
Ah hah...
Because I'm doing through the shell... the change directory command does nothing...
Gotcha..
Code:
@ECHO OFF
adb remount
adb shell mkdir /sdcard/jit
adb shell mkdir /sdcard/dalbk
adb shell mkdir /sdcard/JIT/bin
adb push libdvm.so /sdcard/JIT/libdvm.so
adb push libnativehelper.so /sdcard/JIT/libnativehelper.so
adb push dalvikvm /sdcard/JIT/bin/dalvikvm
adb pull /system/build.prop build.prop_backup
adb push build.prop_JIT /system/build.prop
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock6 /system
adb shell cp /system/build.prop /sdcard/dalbk/
adb shell cp /system/bin/dalvikvm /sdcard/dalbk/
adb shell cp /system/lib/libdvm.so /sdcard/dalbk/
adb shell cp /system/lib/libnativehelper.so /sdcard/dalbk
adb shell cp -f /sdcard/jit/bin/dalvikvm /system/bin
adb shell chmod 755 /system/bin/dalvikvm
adb shell cp -f /sdcard/jit/libdvm.so /system/lib/
adb shell cp -f /sdcard/jit/libnativehelper.so /system/lib/
adb shell cat build.prop >/system/build.prop
adb shell chmod 644 /system/lib/libdvm.so
adb shell chmod 644 /system/lib/libnativehelper.so
adb shell chmod 666 /system/build.prop
adb shell sync
Now the only error is:
"They system cannot find the path specified"
I have no idea what though, going to start taking one line off at a time.
EDIT:
adb shell cat.build.prop >/system/build.prop
This is causing the error.
poor_red_neck said:
Ah hah...
Because I'm doing through the shell... the change directory command does nothing...
Gotcha..
Code:
@ECHO OFF
adb remount
adb shell mkdir /sdcard/jit
adb shell mkdir /sdcard/dalbk
adb shell mkdir /sdcard/JIT/bin
adb push libdvm.so /sdcard/JIT/libdvm.so
adb push libnativehelper.so /sdcard/JIT/libnativehelper.so
adb push dalvikvm /sdcard/JIT/bin/dalvikvm
adb pull /system/build.prop build.prop_backup
adb push build.prop_JIT /system/build.prop
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock6 /system
adb shell cp /system/build.prop /sdcard/dalbk/
adb shell cp /system/bin/dalvikvm /sdcard/dalbk/
adb shell cp /system/lib/libdvm.so /sdcard/dalbk/
adb shell cp /system/lib/libnativehelper.so /sdcard/dalbk
adb shell cp -f /sdcard/jit/bin/dalvikvm /system/bin
adb shell chmod 755 /system/bin/dalvikvm
adb shell cp -f /sdcard/jit/libdvm.so /system/lib/
adb shell cp -f /sdcard/jit/libnativehelper.so /system/lib/
adb shell cat.build.prop >/system/build.prop
adb shell chmod 644 /system/lib/libdvm.so
adb shell chmod 644 /system/lib/libnativehelper.so
adb shell chmod 666 /system/build.prop
adb shell sync
Click to expand...
Click to collapse
yup that looks better
make sure you define everything like that, because, as you said, cd wont do anything when used in the shell in a bat
let me know if you have any more questions/problems. pm me your gtalk if you have one too.
poor_red_neck said:
Ah hah...
Because I'm doing through the shell... the change directory command does nothing...
Gotcha..
Code:
@ECHO OFF
adb remount
adb shell mkdir /sdcard/jit
adb shell mkdir /sdcard/dalbk
adb shell mkdir /sdcard/JIT/bin
adb push libdvm.so /sdcard/JIT/libdvm.so
adb push libnativehelper.so /sdcard/JIT/libnativehelper.so
adb push dalvikvm /sdcard/JIT/bin/dalvikvm
adb pull /system/build.prop build.prop_backup
adb push build.prop_JIT /system/build.prop
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock6 /system
adb shell cp /system/build.prop /sdcard/dalbk/
adb shell cp /system/bin/dalvikvm /sdcard/dalbk/
adb shell cp /system/lib/libdvm.so /sdcard/dalbk/
adb shell cp /system/lib/libnativehelper.so /sdcard/dalbk
adb shell cp -f /sdcard/jit/bin/dalvikvm /system/bin
adb shell chmod 755 /system/bin/dalvikvm
adb shell cp -f /sdcard/jit/libdvm.so /system/lib/
adb shell cp -f /sdcard/jit/libnativehelper.so /system/lib/
adb shell cat.build.prop >/system/build.prop
adb shell chmod 644 /system/lib/libdvm.so
adb shell chmod 644 /system/lib/libnativehelper.so
adb shell chmod 666 /system/build.prop
adb shell sync
Now the only error is:
"They system cannot find the path specified"
I have no idea what though, going to start taking one line off at a time.
Click to expand...
Click to collapse
just copy paste "pause" between the lines.. its quicker that way, and you can see where it fails.
poor_red_neck said:
Ah hah...
adb shell cat.build.prop >/system/build.prop
This is causing the error.
Click to expand...
Click to collapse
this should be
Code:
adb shell cat build.prop >/system/build.prop
no period between cat and build
EDIT:
AND you need to specify the path of the first build.prop, because what that is doing is combining the two build.props
regaw_leinad said:
this should be
Code:
adb shell cat build.prop >/system/build.prop
no period between cat and build
EDIT:
AND you need to specify the path of the first build.prop, because what that is doing is combining the two build.props
Click to expand...
Click to collapse
I JUST found that....
should be /sdcard/jit/build.prop
Let me try that.
Hmm, there is no build.prop that is placed in the /sdcard/jit folder.
The original code is here:
This will enable jit on your phone.
Code:
cd /sdcard/jit/bin
cp -f dalvikvm /system/bin/
busybox chmod 755 /system/bin/dalvikvm
cd /sdcard/jit
cp -f libdvm.so /system/lib/
cp -f libnativehelper.so /system/lib/
cat build.prop >/system/build.prop
chmod 644 /system/lib/libdvm.so
chmod 644 /system/lib/libnativehelper.so
chmod 666 /system/build.prop
sync
reboot
Judging by the last cd... there should be one in /sdcard/jit
hi guys,i'm working for make a rom kitchen for our sg3 those days
it's 40% done,but i have some troubles
i can't root via this script,can you help me?
this is my code:
Code:
adb push .\root\rageagainstthecage /data/local/tmp/rageagainstthecage
adb push .\root\Superuser.apk /data/local/tmp/Superuser.apk
adb push .\root\su /data/local/tmp/su
adb push .\root\busybox /data/local/tmp/busybox
adb shell chmod 755 /data/local/tmp/busybox
adb shell chmod 755 /data/local/tmp/rageagainstthecage
adb shell "/data/local/tmp/rageagainstthecage"
adb kill-server
adb start-server
adb -d shell "mount -o remount,rw /dev/block/stl9 /system"
adb push .\root\su /system/bin/su
adb push .\root\busybox /system/bin/busybox
adb push .\root\sqlite3 /system/bin/sqlite3
adb push .\root\Superuser.apk /system/app/
adb shell "/system/bin"
adb -d shell "chmod 4755 su"
adb -d shell "chmod 4755 busybox"
adb -d shell "chmod 4755 sqlite3"
maybe it's complicate, i tried many times to mod it,but no result.
i run it ,it goes to
adb -d shell "mount -o remount,rw /dev/block/stl9 /system"
this line ,says ‘mount :operation not permitted ’
and it still $ instead of #
i do not know where the problem is ...
plz help me
hi pls their are two tutorials on this subject pls ask ur question in one of the threads
CLOSED
and my base version is ZHJPF
i think u need to su to remount system as rw.
so I'm new to scripting, and I have a TON of lg optimus S's to root for work. So I figured I'd write a script to make life easy. I know all the shell commands are correct as if I manually type everything in it works. What happens is it gets through gingerbreak exploit and when the prompt returns # - everything seems to go to hell.
Here is my script I am using. I'm using Kubuntu 11.04 writing it in Kate, name of my script is Script2 and I'm executing it in bash via $sh Script2
echo "removing TMP directory";adb shell rm -r /data/local/tmp
echo "creating TMP directory";adb shell mkdir /data/local/tmp
echo "pushing gingerbreak";adb push gingerbreak /data/local/tmp/gingerbreak
echo "CD TMP";adb shell cd /data/local/tmp
echo "CHMOD TMP";adb shell chmod 777 /data/local/tmp/*
echo "running gingerbreak";adb shell /data/local/tmp/gingerbreak &
sleep 32
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock5 /system
adb shell cat /sdcard/flash_image > /system/bin/flash_image
adb shell chmod 755 /system/bin/flash_image
adb shell mount -o remount,ro -t yaffs2 /dev/block/mtdblock5 /system
adb shell flash_image recovery /sdcard/xionia_cwma_12518.6.img
adb shell reboot recovery
I've tried with out sleep command and also with out "&" at the end of gingerbreak, and when I do that and it returns # it seems like no commands will work, even if I type them in it returns just a blank line with out #.
With that current script after sleep 32, it returns #, few seconds later it tries to mount and I get (including the end of gingerbreak exploit).
[!] dance forever my only one
# mount: Operation not permitted
Script2: 9: cannot create /system/bin/flash_image: Directory nonexistent
Unable to chmod /system/bin/flash_image Read-only file system
mount -o: permission denied
reboot: Operation not permitted
then it returns me to bash$
Thanks!
So something interesting, I've been playing with this for awhile, and I took everything out past the
adb shell /data/local/tmp/gingerbreak
it seems if I run it as
bash$ adb shell /data/local/tmp/gingerbreak
vs
bash$ adb shell
$ cd /data/local/tmp
$ ./gingerbreak
when # is returned, the first option won't take any commands its like it hangs, if I type out the next command it will just return a blank line with out $ or #, I have to forcibly end the process by CTRL+C and it will return me to bash, if I do the second option it works and I can enter the next command in and it takes and returns me to #. Anyone know why this is? I'm pretty sure this is the problem.
I would happily use the second option, but I'm not sure how to get the script to take any android shell commands without a "adb shell" infront. If anyone knows how to get around this, that would be awesome =)
Dear all
I know there are numbers of you who want to start developing for our XL. There are numbers of way to flashROM. Either you can flash your ROM via system.img or ROM.zip etc etc. And here are we to explore creating rom via adb script. The earlier two ROM flashing mean require you to have unlocked bootloader but adb script ROM can be flashed on L/UL mobile devices. Lets get started with:
NOTE: The phone needs to be rooted to flash adb script. For your assistance I will attach a ROM template along with this post.
Click to expand...
Click to collapse
Preparation
Please create two folders inside your working folder with name [Your ROM Name] and [Your ROM Name_PC].
Copy all your system files/folder inside your [Your ROM Name] folder.
Please avoid creating folder within folder to avoid confusion. For example: if you are adding ringtones in your ROM consider creating folder inside [Your ROM Name] with name ringtones instead of creating folder structure like media/audio/ringtones.
In [Your ROM Name_PC] folder create a folder with name adb and copy adb.exe, AdbWinApi.dll and AdbWinUsbApi.dll inside it from your android sdk. If you are using my template then you can skip this step as i have already included adb folder inside [Your ROM Name_PC]
Scripting ADB Flasher
1. Create a new text file and rename it as Setup.bat. Remember to remove .txt extension and replace it with .bat extension.
Right Click on Setup.bat and click Edit. The file will open in notepad.
2. Copy Following lines of Code and paste it in your Setup.bat file.
HTML:
[user=279333]@ECHO[/user] off
TITLE [YOUR ROM NAME] by [Dev_Name] [Version 1.0]
COLOR 70
mode con:cols=100 lines=40
ECHO.
Pause
ECHO Waiting For Device.....
[user=302893]@adb[/user]\adb wait-for-device
[user=302893]@adb[/user]\adb shell "su -c 'stop'"
ECHO Getting System access.....
[user=302893]@adb[/user]\adb shell "su -c 'mount -o rw,remount /system/ /system/'"
This will mount system folder with read write privilege.
3. Before flashing your apks and other stuff you need to make sure you remove corresponding stuffs from the system. I have listed generic folders inside the code below please add/delete lines as per your application preferences.
HTML:
ECHO Removing system files
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/app/*.odex'"
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/app/*.apk'"
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/fonts/*.ttf'"
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/framework/*.jar'"
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/framework/*.apk'"
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/framework/*.odex'"
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/media/audio/ringtones/*.ogg'"
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/media/audio/alarms/*.ogg'"
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/media/audio/notifications/*.ogg'"
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/media/audio/ui/*.ogg'"
ECHO System files removed successfully!
ECHO.
4. Copy each and every content of each folder you want to flash in corresponding folders of the system. Below is the sample code please consider adding/deleting as per your preferences.
HTML:
ECHO COPYING FILES.....
[user=302893]@adb[/user]\adb shell "su -c 'cp /sdcard/[Your ROM Name]/framework/* /system/framework/'"
[user=302893]@adb[/user]\adb shell "su -c 'cp /sdcard/[Your ROM Name]/app/* /system/app/'"
[user=302893]@adb[/user]\adb shell "su -c 'cp /sdcard/[Your ROM Name]/fonts/* /system/fonts/'"
[user=302893]@adb[/user]\adb shell "su -c 'cp /sdcard/[Your ROM Name]/media/* /system/media/'"
[user=302893]@adb[/user]\adb shell "su -c 'cp /sdcard/[Your ROM Name]/ringtones/* /system/media/audio/ringtones/'"
[user=302893]@adb[/user]\adb shell "su -c 'cp /sdcard/[Your ROM Name]/alarms/* /system/media/audio/alarms/'"
[user=302893]@adb[/user]\adb shell "su -c 'cp /sdcard/[Your ROM Name]/notifications/* /system/media/audio/notifications/'"
[user=302893]@adb[/user]\adb shell "su -c 'cp /sdcard/[Your ROM Name]/ui/* /system/media/audio/ui/'"
5. After you have copied all your files/folders into the system you need to add permission in case of framework and apps and any other folders requiring special permission. Below is the sample code please consider adding/deleting as per your preferences.
HTML:
ECHO SETTING PERMISSION.....
[user=302893]@adb[/user]\adb shell "su -c 'chown 0.0 /system/framework/*.jar'"
[user=302893]@adb[/user]\adb shell "su -c 'chmod 0644 /system/framework/*.jar'"
[user=302893]@adb[/user]\adb shell "su -c 'chown 0.0 /system/framework/*.apk'"
[user=302893]@adb[/user]\adb shell "su -c 'chmod 0644 /system/framework/*.apk'"
[user=302893]@adb[/user]\adb shell "su -c 'chown 0.0 /system/app/*.apk'"
[user=302893]@adb[/user]\adb shell "su -c 'chmod 0644 /system/app/*.apk'"
6. We are almost done now. Please consider copying following codes and adding them at the end of your script to remount system as read-only and rebooting the mobile device.
HTML:
ECHO.
ECHO --------------------------------------------------------
ECHO ----------ROM INSTALLED SUCCESSFULLY------------
ECHO --------------------------------------------------------
ECHO.
[user=302893]@adb[/user]\adb shell "su -c 'mount -o ro,remount /system/ /system/'"
ECHO Rebooting System
[user=302893]@adb[/user]\adb reboot
ECHO.
ECHO Please be patient till device reboot!
ECHO.
ECHO.
ECHO --------------------------------------------------------
ECHO -----------------------THANK YOU------------------------
ECHO --------------------------------------------------------
ECHO.
pause
7. Now zip both [Your ROM Name] and [Your ROM Name_PC] folders and upload them to the file sharing sites of your convenience.
If all goes well you will have a superb ROM to share here at XDA. Please find the attached template along with this post.
If you like this tutorial please press thanx at the bottom of the post.
Have a happy time porting.
CREDITS will be highly appreciated.
So I am trying to make a batch file that automatically flashes a custom bootanimation from my computer and I am having trouble with these commands.
adb wait-for-device shell "su -c 'ls /system/media'"
adb wait-for-device shell "su -c 'mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system'"
adb wait-for-device shell "su -c 'rm /data/media/bootanimation.zip1'"
Bascially I want to have the adb shell enter superuser mode, remount system in read write mode and delete the existing bootanimation.zip
Whenever I try and run this it says permission denied.
Please post your question in Android General so that the right experts may be of help.
Thread Closed. Thank you.