Replacing system files on-the-fly - Galaxy S I9000 General

I have a question about replacing system files (system accelerators) on-the-fly, the idea is to make a bat script which uses adb to do the following thing:
If Adrenaline shot is installed and want to change to thunderbolt:
First using the stop command so the phone freezes
then removing adrenaline shot:
- Replace with stock one:
* system/bin/app_process and system_server
* system/lib/libsqlite.so and libsqlite_jni.so
- Remove:
* system/etc/init.d/(all)
* system/etc/sysctl.conf
Then push thunderbolt:
* sdcard/bolt-scripts/(all)
* system/etc/init.d/(all)
* system/lib/libncurses.so
* system/xbin/sqlite3 and zip
* data/99supercharger.sh, local.prop, superchargeradj, superchargerminfree
Then reboot
Click to expand...
Click to collapse
If Thunderbolt is installed and want to change to Adrenaline Shot:
First using the stop command so the phone freezes
then removing thunderbolt:
- Remove:
* system/etc/init.d/(all)
* system/xbin/tune2fs, fsck.ext4 and zipalign
* data/99supercharger.sh, local.prop, superchargeradj, superchargerminfree
* sdcard/bolt_scripts/(all)
- Replace with stock one:
* system/bin/app_process and system_server
* system/lib/libsqlite.so, libsqlite_jni.so and libncurses.so
* system/xbin/sqlite3
* data/local.prop
Then push adrenaline shot:
* system/bin/app_process and system_server
* system/etc/init.d/(all)
* system/etc/sysctl.conf
* system/lib/libsqlite.so and libsqlite_jni.so
Then reboot
Click to expand...
Click to collapse
(made these lists according to updater-script)
Is it possible to do this without getting a brick? just like you flash themes in broodROM Configurator.
Another thing is, how do I add the remount script (running as root) of thunderbolt to scripts which load on boot (not init.d execution but when system is loaded)?
(the thing you normally do with script manager)

I don't like to double post. But can someone who knows it please reply?

The only command that I know which might help is invoked in adb: stop.
It literally freezes the whole phone but you can still access the whole filesystem over adb and replace files or remount. Obviously, when you do replace those files, you have no other option than to perform a reboot after you're done. Otherwise processes will crash and FC.

wintel_mac said:
The only command that I know which might help is invoked in adb: stop.
It literally freezes the whole phone but you can still access the whole filesystem over adb and replace files or remount. Obviously, when you do replace those files, you have no other option than to perform a reboot after you're done. Otherwise processes will crash and FC.
Click to expand...
Click to collapse
Ok thanks I had that in mind. so I will make a fully automated system accelerator switch script

Related

how can i back up app settings?

i want to wipe my phone but dont want to lose settings for some apps such as locale and io shopping. is there a way to pull files off the phone that store app settings, wipe and then push them back to restore the settings?
any other way to do this?
Pinesal said:
i want to wipe my phone but dont want to lose settings for some apps such as locale and io shopping. is there a way to pull files off the phone that store app settings, wipe and then push them back to restore the settings?
any other way to do this?
Click to expand...
Click to collapse
Code:
cp -R /data/data/edu.mit.locale /sdcard/locale/
that would be the shell commands to backup your entire Locale database and preferences from its permanent home on your phone to an sdcard folder called "locale"
Or you could do:
Code:
adb pull /data/data/edu.mit.locale/* C:\android\locale
which would be the adb command to pull the folder from the phone and put it in a folder on your C drive called "android\locale"
since I don't have oi shopper installed, I can't tell you the database location but if you go into a shell and do
Code:
cd data/data
ls
you should see something like com.android.oi.shopper or com.shopperoi.android or something along those lines....once you have the folder location, you can use the above code to pull it out onto your computer.
To restore you have to put the files for Locale back here:
Code:
/sdcard/locale/edu.mit.locale/* /data/data/edu.mit.locale
and some similar code for oi shopper
Check out this link for more info on how to explore the file structure of android and some helpful commands
http://forum.xda-developers.com/showthread.php?t=488928
Sounds good, that is very helpful. If I just pulled the entire data folder, would that back up the settings for every app?
Pinesal said:
Sounds good, that is very helpful. If I just pulled the entire data folder, would that back up the settings for every app?
Click to expand...
Click to collapse
Some people will tell you that you only have to pull the .db (database) file usually within the database folder of a particular app in order to backup the settings. I took it one step further and just simply backup and restore the entire application folder and it works fine. I have my doubts that if you just back up and restore the entire /data/data folder, that it will work, but you can give it a try. I might do the same on my spare G1 for ****s and giggles too.
I have tested my method on the following:
Apps
* A2b
* Amazon
* Twidroid
* Simchecker
* Locale
* Doom
* Flixster
* Gmail
* Email
* Gmote
* Gscripts
* Keyring
* Market
* Missed Call
* Shazam
* SMS Popup
* SMS Sync
* Tunewiki
* TunesRemote
* The Weather Channel
* Youtube
* Default Text Message
as well as on the following settings
Settings
* Launcher (will remember home screen settings this way)
* Wifi
* dictionary
* Call log
* alarms
* google settings, and settings....not sure what these do, but I found them in the /data/data tree so I back them up and restore anyway. I hope that answers your questions.
any idea if this would work for open home and better cut
i hate after flashing roms having to rest my desktop and all my icons
johnt2k said:
any idea if this would work for open home and better cut
i hate after flashing roms having to rest my desktop and all my icons
Click to expand...
Click to collapse
It should work on everything as long as you can find, backup and restore the appropriate folder.

[DEPRECATED][SCRIPT]g_BonE's Slaid480 LagFreeV3 ReRolled -errorfixed- -optimized-

I switched to a I9001 Galaxy S Plus, thus no more updates.
About
If You are like me - a fan of those monolithic install-and-forget scripts to optimize Your Ace at boot then this is for You.
As a base i took Slaid480's LagFreeV3 script and fixed some errors in it. Seeing that his script constantly overwrites earlier tweaks set up in itself i went on to consolidate it.
After that turned out succesful i combed through all the other scripts, snippets and tweaks floating around XDA (TurboBoostv8.5, BoostBuster, allinone Ram) and came up with my solution of a monolithic All-In-One script.
This here script contains all the useful tweaks for the Ace, was error checked, optimized and thoroughly tested on my personal Ace.
This is a continuation of the thread:
[SCRIPT] Slaid480's LagFree V3 script -fixed- -optimized-
http://forum.xda-developers.com/showthread.php?t=1486930&page=11
Required
* Ace S5830
* Root
* CM7.x
* Busybox (should already be there if rooted)
* Kernel supporting NOOP scheduler and SmartA**V2 governor
Script was tested on:
zImage-Mod v1.1 and v1.2 Kernel
http://forum.xda-developers.com/showthread.php?t=1292200
CM7.2 RC0 KANG by vo-1 deodexed with PDroid
http://forum.xda-developers.com/showthread.php?t=1462178
Instructions
- Make a nandroid of Your phone (just in case).
- Flash zip using CWM recovery.
- Reboot.
- Success.
An optional error logging function can be enabled by creating an empty
file named lagfree_debug in Your /data/ folder. Doing so will allow the
script to create a logfile /data/lagfree_debug.log during execution on
boot. This might help for finding issues on other ROMs and Kernels.
The script now contains some logic so when it does not succesfully run
to its end it will disable itself on the next boot. This will fix the "stuck
on android" issue.
To remove the script alltogether just flash the LagFreeV3_Rerolled_
Uninstaller.zip via CWM.
Credits
* SLAID480
* GadgetCheck
* Juwe11
* Salah Abouabdillah
* Einherjar Development Team
* CRANIUM ROM
* zacharias.maladroit
* voku1987
* [email protected]
* redmaner
* pikachu01
* fuss132
* LeonardLuangga
* Team Blockbuster
* tossan
* iandol
* _Roysten
* dragonnn
* XDA (for the help identifying the bugs)
* Everyone (i forgot but who put an effort into parts of this script)
Enjoy,
g_BonE
Changelog
0.17b - first release in XDA Development subforum, replaces older version --- REMOVED DUE TO setprop ISSUE!!!
0.23b - second release, replaces older version: setprop slot fix and bootloop (stuck on android) fix implemented. Thanks to tossan, iandol, _Roysten and dragonnn for the detective work and help getting this fixed.
Now, thank you! And why is it that we need CM7? Isn't this supposed to run on stock roms (rooted of course, and with cf-root kernel)?
WAIT so is this the combination of the given tweaks in OP or just fixed Lagfree? Kinda confusing O.O
original lagfreev3 runs great on stock with all permissions checked. Is this for stock also?
itasoulas said:
original lagfreev3 runs great on stock with all permissions checked. Is this for stock also?
Click to expand...
Click to collapse
if you consider "runs great" to mean that it fails to run properly because it has more bugs than the Amazon Jungle and thus it can run "great" anywhere because it actually fails to run everywhere!!!
lagfreev3 original is like homeopathy!
How do I install this over original lagfree?
Sent from my GT-S5830 using xda premium
iAreBeRtii said:
How do I install this over original lagfree?
Sent from my GT-S5830 using xda premium
Click to expand...
Click to collapse
Why do you want to install it over the original one? It was stated that it has too many bugs. Just delete the old one and flash this.
actually no need to uninstall, the installer of my script removes the original lagfreev3, turboboost and other scripts from init.d
and no, no need to install anything else besides this one its ALL INCLUDED
does this work on stock?
g_BonE said:
actually no need to uninstall, the installer of my script removes the original lagfreev3, turboboost and other scripts from init.d
and no, no need to install anything else besides this one its ALL INCLUDED
Click to expand...
Click to collapse
so, just install this script, and we're done?
Cool! Thanks gbone, you's a boss!
flashing your script makes my phone stuck on boot. i have LeWa rom installed. also, lagfreev3 and turboboostv8 is installed..
tomy2590 said:
flashing your script makes my phone stuck on boot.
Click to expand...
Click to collapse
Wait awhile and see if the desktop loads. I guess it takes time to rebuild the caches.
@g_BonE
You sholdn't clean up the caches (especially the *.apk files) on every reboot (->Dalvik Optimization).
The user can do it manually in CWM. This is only necessary before installing a custom rom or after modding some system files.
Otherwise: Great clean up work done! Hope all the script lovers appreciate it. Here are the line counts as a rough comparision:
Code:
[email protected]:~/Downloads/$ wc -l S9*
1130 S95Lagfree
305 S99_LFv3gB
1435 total
^^
@DooAce: I cant positively answer on the "working on stock" question as idont have a stock rom on my ace. i'd say it *should* if the rom has init.d support and the other requirements posted in the first post. anyone willing to give it a shot might do so using the debug feature and posting the logfile here so i can have a look.
@tossan: yes, i'll make the zipaligning a optional step, maybe using the same approach i took with the debug option (-soon-)
@tomy2590: and yes, first boot will take a while as zipaligning and database optimization takes a while. please be patient for a bit.
Doesn't work on Ace-of-Spades V1 - stuck on Android for over 20 minutes.
I have debug this script - don't know why but it's stuck on the setprop lines, removing it will repair this script. You can add on the begin of this script the command:
Code:
adbd &
And on the end:
Code:
killall adbd
Using this you can debug this script (via logcat) in real time and show on what he stops.
g_BonE said:
@tossan: yes, i'll make the zipaligning a optional step, maybe using the same approach i took with the debug option (-soon-)
Click to expand...
Click to collapse
I'm referring to this line at the end of the file, which will be executed on every phone reboot, making the dalvik cache unusable.
Code:
rm -f /data/dalvik-cache/*.apk
The zipaligning should be ok, because the code fragment only zipaligns new installed apks, if they're not already aligned.
~~
Phone rebooted succesfully afyer flash themyhrom advanced
g_BonE said:
actually no need to uninstall, the installer of my script removes the original lagfreev3, turboboost and other scripts from init.d
and no, no need to install anything else besides this one its ALL INCLUDED
Click to expand...
Click to collapse
Awesome! Thanks!
Sent from my GT-S5830 using xda premium

AOSP Compiled but not booting

Hi,
I gave a try to compile clean AOSP 2.3.7 from Google and it got compiled ok, but it doesn't boot anyway.
What I need to change to make it working?
Emulator isn't working too, just ANDROID_ text is there. Do I need to add any device-specific changes to AOSP code to make it boot?
I've used:
-Andromadus device for gb with few changes,
-msm-7x30 common from cm, adding special headers for hardware
-SU with fix to use external binary, from CM & nexus aosp development thread
-proprietary files for vision, from CM (koush)
-hardware/libhardware & hardware/qcom & hardware/msm7k
-system/vold also from CM because ext4 support
I don't except any functions will work, but I need to just boot it first!
Btw. How to exclude /recovery in OTApackage ? I've found Froyo code for this, but GB is different.
bump
[email protected]:~$ adb lolcat
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
- waiting for device -
- exec '/system/bin/sh' failed: No such file or directory (2) -
Click to expand...
Click to collapse
seems better but still not booting, looks like system is not being mounted correctly because binary is there. used ilwt kernel for now and at least logcat is working.
do you get anything on logcat?
[email protected]:~$ adb lolcat
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
- waiting for device -
- exec '/system/bin/sh' failed: No such file or directory (2) -
Click to expand...
Click to collapse
as posted before.
This is entire log, then phone reboot in recovery mode.
I'm compiling now with some changes to rc files and init, not sure if this will work but trying.
Ok, I gave up.
Removed my sources because I think it was pointless to make clean aosp and I'm not too experienced to make it by yourself .
Thanks Srkineo for interesting.

[APP] A minor fix of GScript, run shell script in Android UI

Here is a minor fixed version of a precious app name GScript.
1. fixed the FC in recent Android after script was fired.
2. Go back HOME instead of opening the main activity ( That mean after a script is run, then the app quits )
You can find some useful script in this thread.
GScript * Easily launch/save shell scripts from within Android UI * - Useful scripts
and the original thread here :
GScript * Easily launch/save shell scripts from within Android UI
Checked logcat and sqlitedatabase still throws close() was never explicitly called on db...log attached
A workaround for the program exit on execute would be nice tho.

[GUIDE]extract kernel and change bootclasspath[noob friendly][video guide]

Kernel modification GUide​
Code:
#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
it is a guide for those who want to port roms from devices of another manufactures.....
they port whole rom but sometimes stuck at kernel modification path....
so now guys u dont have to worry becoz i made a guide easy to understand and
also made a video guide which is uploading at a moment
Click to expand...
Click to collapse
SO LEt get STARted​
Things required:-
kitchen files
cygwin
notepad++ (recommned)
a brain:good:
some time
Click to expand...
Click to collapse
Steps​
1. Set up cygwin and kitchen USe Nero young's guide -->>>Guide
2. u need to make 2 folders on ur desktop
(a)base kernel(YOur device kernel)-->> copy ur whole rom files(meta-inf,system,boot-.img) in that folder..
(b)port kernel (Kernel from other device)--->> boot.img of other device....
3.now open cygwin and type :- cd kitchen then ./menu
4. it will now open kitchen
5. now go to c:/cygwin/home/{USER NAME}/kitchen/original update/WORKING_XperiaNeroROM/ copy all things here from base kernel folder..
6. now open kitchen (REMEMBER NEVER CLOSE KITCHEN UNTILL WRITTEN HERE)
7. press 1 and it will set up current working folder press enter whole the way
8. now when your working folder is set up press 0 to go to advance options
9. press 20 to open kernel modification menu...
10. press 'w' it will extract ur kernel to c:/cygwin/home/{USER NAME}/kitchen/Boot-Extracted
11. now for extracting other device boot.img press 'a' on kitchen. it will ask u to place ur boot.img to c:/cygwin/home/{USER NAME}/kitchen/boot-img.xxxxx
12.now for changing bootclasspath.. open boot-img.xxx go to boot-img ramdisk and open init.rc with notepad++
13. copy the whole line 'export bootclasspath x/x/x/'
14. now go to boot-extracted folder find init.rc and replace the boot class path
15. save init.rc of boot-extracted
16. press 'b' on kitchen menu
17. close ur kitchen now
18. your new modified kernel will be in your working folder
​press thanks if i helped you​
Video Guide

Categories

Resources