[CM7][OMFGB]Software GPS Fix | V1.5.1 - 9/25/11 | Keep the (GPS) lights on! - Vibrant Android Development

Hi all -
I wrote a script and created a CWM update-flashable to perform a one-line install of the CM7 GPS Fix, documented here by jwleonhart. There were some complaints about jwleonhart's install instructions; it's a bit cumbersome and not trouble-free, especially for noobs. Please read the original thread for detailed instructions on what my script does; the script exactly does jwleonhart's instructions.
NOTE: EVERY VERSION OF THIS FIX MAKES SUBTLE BUT IMPORTANT CHANGES THAT MAY IMPROVE OR DEPRESS YOUR GPS FUNCTIONALITY. UNTIL A TRUE GPS DRIVER DROPS FOR THE VIBRANT (which at this point seems very unlikely) ALL WE CAN DO IS HACK AND TWEAK. NEWER VERSIONS MAY WORK BETTER OR WORSE THAN OLDER ONES! PLEASE POST WITH YOUR EXPERIENCE USING THE VARIOUS VERSIONS OF THE FIX, AND PLEASE BE CONSTRUCTIVE/HELPFUL WITH YOUR FINDINGS!
There are three separate ways to install: CWM, CWM with no gpsd, and via shell script.
CWM Installation
The easiest way to install the GPSFix files is to download and flash Vibrant_CM7_GPSFix_V1.4-CWM-signed.zip. All files will be copied over and read/execute permissions will be properly set.
NOTE: Flashable does NOT contain AngryGPS. There are some people who have better results without it, so I'll let you install that one on your own. You can find the APK at jwleonhart's CM7 Install Guide.
OPTIONAL: There's a no-gpsd version of the CWM flashable as well - if you want to use the gpsd from your current nightly, or mix and match. The GPS driver might get better in time, and who knows if down the line the gpsd bundled with the latest nightly is better than this one, pulled from Trigger Redux#13 (CM7 Nightly#54).
Script Installation
The script is available for users who want to customize their own GPS fix. It requires an extra reboot (since you can't just run the script after installing a new nightly), but you can easily add/remove files to the script to suit your own needs. Personally, I use the script to test new versions before they go into the CWM flashable.
Attached is the zip file with all the files and the shell script you need. Just extract the folder to your SD card; then in a terminal (ADB or terminal emulator with root), run these commands:
Code:
su # if you're not already dropped into superuser status
cd /sdcard/GPSFix
bash GPSFix.sh
It will automatically copy all the files (gpsd, secgps.conf, gps.conf, 90getgps_lto) to the right places, then set permissions those files, then reboot. AngryGPSmod.apk is in there but is not installed; I suggest try the GPS fix without AngryGPS first, then install it after if you don't get good results.
Script Contents
For those interested, here's the contents of the script..
Code:
#!/system/xbin/bash
FIXFILES="/system/etc/gps.conf
/etc/init.d/90getgps_lto
/system/vendor/bin/gpsd"
REMOVEONLY="/data/gps/lto.dat
/data/gps/lto2.dat
/data/gps/svstatus.txt
/data/gps/ltoStatus.txt
/data/gps/secgps.conf
/system/bin/agpsd"
mount -o rw,remount /system
echo "==================================================="
echo "======Vibrant CM7 GPS Fix One-Command Install======"
echo "=================by strictlyrude27================="
echo ""
# Delete previous fix files
echo "Deleting previous fix files..."
for file in $FIXFILES $REMOVEONLY
do
if [ -f $file ]; then
rm $file
fi
done
# Copy new files and set permissions
echo "Copying new files over..."
for file in $FIXFILES
do
fname=$(basename $file)
cp $fname $file
chmod 0755 $file
if [ $file == "/system/vendor/bin/gpsd" ]; then
chgrp shell $file
fi
done
echo "Rebooting device.. Enjoy GPS!"
echo "Install AngryGPSmod.apk manually if you want to."
echo ""
reboot
Credits
jwleonhart - writing up the CM7 install guide
roffee - finding the original GPS Fix for CM7
jad3675 - providing original Long Term Orbital download script
PLEASE go to their threads and hit their Thanks button. They did all the heavy lifting, I just packaged up their findings and work into a simple-to-use flashable.
"If I have seen far, it is because I have stood on the shoulders of giants."
--Isaac Newton
Changelog:
Code:
V1.5.1
-- renamed init-script to overwrite CM7's implementation of V3 of this fix
-- now offering "newgpsd" variant - contains gpsd from latest CM7 nightly
-- standard zip: faster locks, but more prone to randomly quitting working
-- newgpsd variant: slower locks, but more resilient GPS indicator [color="red"] still needs testing[/color]
V1.5
-- cleaned up script
-- now keeping LTO data named lto2.dat (used to rename to lto.dat)
-- lowering threshold for lto2 refresh to 3 days
V1.4 (all variants)
-- replaced lto.dat with lto2.dat - preliminary testing indicates survival after reboot and better TTFF
-- now using us.pool.ntp.org for the time server - if you're not in the US, please adjust your gps.conf accordingly
-- gps.conf tweaks - trading accuracy for TTFF for now..
V1.3.1 (all variants)
--set permissions on downloaded lto.dat to 755 (was 644) - i couldn't get
any birds in view before, now i can lock. give this a try if 1.3 doesn't work.
V1.3 (all variants)
--removed agpsd
--added 90getgps_lto - will fetch latest long term orbit data on boot
--hopefully these changes help get REPEAT locks faster - please let us know!
V1.2CWM-nogpsd
--same as V1.2CWM, but with no gpsd. This way you can use gpsd from
the latest CM7 nightlies, or whatever nightly gpsd worked best for you.
I will start collecting gpsd files and posting them for your convenience soon!
V1.2CWM
--created CWM flashable for your convenience! performs the EXACT SAME
as the script, so if you've already run V1.2, no need to flash V1.2CWM.
But, it could be useful if you tend to flash nightlies all the time.
V1.2
--changed all file permissions to 0755 - not sure how reading .conf files
worked if there wasn't any read permission. gets me a faster lock after
applying the script.
V1.1
--fixed typo - "chmod shell" should have been "chgrp"
--removed \t, \n - was not being interpreted by shell correctly
V1
--initial release
If I helped you with your CM7 experience, please hit the Thanks Button

im about to try this

Dear all -
Script was updated to V1.2. I noticed that no read permissions were set to the .conf files; my thinking is there's no way Android could read those config files without read permissions, so they weren't even doing anything.
That said, the latest script now gives permission 0755 (rwxr-xr-x) to all files. After running the script now, I get a lock after first reboot in about 25 seconds.
You can download V1.2 and start from scratch, or just copy/paste the latest script contents into your GPSFix.sh. Or, run the following commands at a terminal (ADB or terminal emulator with root):
Code:
su
mount -o rw,remount /system
chmod 0755 /data/gps/secgps.conf
chmod 0755 /system/etc/gps.conf
chmod 0755 /system/bin/agpsd
mount -o ro,remount /system
reboot
Also, I noticed 31 downloads (and there were 20-some in the original post) but only a total of 3 Thanks.. I'm kind of addicted to the Thanks button and don't ask for donations otherwise, please push it if I help make a better CM7 experience for you

do they work with MIUI ?

chuotcontodung said:
do they work with MIUI ?
Click to expand...
Click to collapse
Should work with any CM7-based ROM; I hope someone else can confirm, though; I only run vanilla CM7 and occasionally Trigger Redux.

Any chance to make it CWM-based ?
It'd be so much nicer to drop the zip into a SD root and just run it after every nighty installation.

strictlyrude27 said:
Dear all -
Script was updated to V1.2. I noticed that no read permissions were set to the .conf files; my thinking is there's no way Android could read those config files without read permissions, so they weren't even doing anything.
That said, the latest script now gives permission 0755 (rwxr-xr-x) to all files. After running the script now, I get a lock after first reboot in about 25 seconds.
You can download V1.2 and start from scratch, or just copy/paste the latest script contents into your GPSFix.sh. Or, run the following commands at a terminal (ADB or terminal emulator with root):
Code:
mount -o rw,remount /system
chmod 0755 /data/gps/secgps.conf
chmod 0755 /system/etc/gps.conf
chmod 0755 /system/bin/agpsd
mount -o ro,remount /system
reboot
Also, I noticed 31 downloads (and there were 20-some in the original post) but only a total of 3 Thanks.. I'm kind of addicted to the Thanks button and don't ask for donations otherwise, please push it if I help make a better CM7 experience for you
Click to expand...
Click to collapse
You need to add "su" to the first line of your installation instructions

ferhanmm said:
You need to add "su" to the first line of your installation instructions
Click to expand...
Click to collapse
I assumed you would be entering the terminal with root. I'll update that in the OP though, thanks.
svladimir said:
Any chance to make it CWM-based ?
It'd be so much nicer to drop the zip into a SD root and just run it after every nighty installation.
Click to expand...
Click to collapse
I don't know how to make an update.zip, but perhaps this will be a good time to learn! I'm way better at shell scripting which is why I went this route. I'll see what I can do, hopefully I can have a CWM flashable soon.. if anyone else can help me I would much appreciate it.
That said, note that you can still open an adb shell in recovery mode, so you could run the script after you flash the nightly. I haven't tried that, but I will soon.

strictlyrude27 said:
I assumed you would be entering the terminal with root. I'll update that in the OP though, thanks.
Click to expand...
Click to collapse
Lol yea but I guarantee you that if you didn't add it more than 20 people would ask

It turns out making an update.zip isn't so hard after all testing it now, if it works out I'll upload to OP. I'll keep the original scripts and stuff for posterity's sake.

Great efforts, wow
This is just great piece of development, a sure and simple cure for the GPS and the CM 7+ roms.
Now that you have created this script, one so simple, there will be leages of Vibrant Users who will be able to take advantage of your generousity and put this puppy to work.
Kudos and once again, great work.... W.0.W.
I can confirm, with the AngryGPS I was able to lock in with fast lock in up to Accuracy of 20 feet, picked up 8 of the 12 satellites in view.
Thank you very, very much....

Dear all -
V1.2CWM released! As requested, a CWM flashable zip has been created. It does literally the exact same thing as V1.2 (copies over the GPS files to the right locations, sets 0755 permissions on all files). You don't need to flash if you've already installed V1.2, but I would keep the zip on hand for when you decide to flash a new nightly.
As always, the Thanks button lets me know I'm loved
I plan on starting a gpsd database, seems that while all gpsd's are created equal, some are more equal than others so you can mix and match the gpsd from a previous nightly, rather than referring to the supermassive black hole that is the official CM7 Nightly thread.
And finally, I must point out that I did NOT create these fixes. All the credit and praise belongs to jwleonhart and roffee. I just packaged up their work into an easy-to-install package, those guys did the real work! Please find their threads in the Credits section of my OP and hit the Thanks button!

My phone refuses to download these. Annoying.

^ try getting astro, go to preferences and allow internet downloads.
Also, chrome to phone is amazing

s15274n said:
^ try getting astro, go to preferences and allow internet downloads.
Also, chrome to phone is amazing
Click to expand...
Click to collapse
I already did the astro thing.
Turned it on and off several times.
And I used chrome to phone to send the link, with the same result.
I swtiched over to Opera, and that eventually agreed to download it.

OP updated. I now offer a no-gpsd version of the CWM flashable, in case you want to keep your gpsd or mix and match with other nightlys. I'll put up a link to a Dropbox to store GPS drivers from every nightly.
Ironically, the fix used to work for me 100% of the time, but not anymore. I'm going to start experimenting with new gpsd's from CM7 nightlies; please also let me know of your own results!
EDIT: I wasn't getting locks, or was getting and losing locks with my fix. Tried #72 gpsd and the nogpsd flash.. 0/8 birds after 5 minutes. Reflashed my own fix. TTFF [time to first fix] 17 seconds, 7/10 satellites, 150 ft accuracy. After 1 minute, 20 foot accuracy. Rebooted. 0/10 after 5 minutes.
I wish I understood you, GPS. I wish I understood you.

very nice.. i tried right now..
before this, its takes serveral minutes to get a lock.
after this patch.
first 30 secs, In View 12 satts.
1 min, get in USE 4 satts, 25 meters accuracy.
2 min, get 6 satts, 7 meters accuracy.
Very fast!
Thanks!

Nice!!! It will be much much easier now to get GPS working after nightlies. Awesome!
Sent from my SGH-T959 using XDA App

This works but great the first day but
GPS seems to not even lock in the next day.

Dattack said:
This works but great the first day but
GPS seems to not even lock in the next day.
Click to expand...
Click to collapse
tell me about it. i put the damn thing together and i'm in the same boat. It's really hit or miss for me.

Related

[GUIDE] All Tattoo questions and answers see here (from A to Z)!

Hi,
this thread is meant as a starting point for every kind of questions. I will write everything I know into this thread and update it (hopefully) frequently
Here are the topics handled for now (if you have any other questions you want to have answered you can PM me, so I can try to handle it if I know the solution and add this to my to do list in point 5!!! ):
1. How can I root my phone
1.1 General information/Basic adb-commands
1.2 Do I have to create a goldcard?
1.3 Tools you need
1.4 The automated way
1.5 The manual way (recommended by the author)
1.6 Problems and (hopefully good) solutions
1.7 References
2. Flashing images/ROMs
2.1 What is a recovery image
2.2 What is a boot image
2.3 How to flash/tools needed
2.3.1 Creating a Goldcard
2.4 Where can I get an overview of the existing ROMs?
2.5 Problems during flashing and solutions
2.6 References
3. Information about the Tattoo/Useful stuff
3.1 How to install busybox?
3.2 Can it perform multitouch?
3.3 How to increase battery life?
3.4 Using own ringtones for calls/sms
3.5 How to disable data transfer with a custom ROM?
3.6 How to make the Tattoo ring louder?
3.7 How to replace the home screen?
3.8 Disabling xxx-synchronisation with Google-servers
3.9 Backing up apk's and data to your PC
3.10 How to enable more languages on my mobile?
3.11 How to manually delete system apks? Alternatively with GUI?
4. Dev-Goodies
4.1 Modifying update.zips and resigning them
4.2 Modifying resources in apk-files and resigning them
4.3 Installing apks via adb for getting exact error codes if installation fails
4.4 Everything related to ROM cooking
5. Things I will do better in this thread due to user request
Please note: I won't be giving tutorials about Android-apps usage beside the one mentioned in my tutorial!
Let's start now:
1. How can I root my phone?
1.1 General information/Basic adb-commands
Rooting a phone enables you to do things, which normally aren't possible for the average user like:
- Removing apps which were preinstalled by the provider (like Orange, Vodafone, etc.). My Tattoo had Vodafone apps for buying music and other sh*t, which was installed on the system partition (to which a "normal" user has no rights to write to, including deleting).
The Tattoo was successfully rooted by a bunch of guys here, namely -bm-, mainfram3 and Coburn64 (maybe, I don't remember quite correctly ). Also the Tattoo was the first phone having a security mechanism hindering a user to mount the filesystems as read/write, which had to be overridden by remapping the read only memory region to a read/write one. This is done by the module Tattoo-hack.ko, also made by mainfram3. He also created the first boot.img, which enabled su directly from adb and loading Tattoo-hack directly from boot on.
A few words about adb:
ADB is a tool for communicating from the PC with the mobile phone. For this a service is running on the phone enabling the communication via Terminal Emulator. Here are the most useful adb-commands:
Code:
adb push localFileFromPC /path/on/mobilephone
-> pushes a file "localFileFromPC" to a specified location on the phone
adb pull /path/to/file pathFromPC
-> receives a file from the phone and stores it to "pathFromPC"
adb remount
-> This is only possible in custom ROMs, remounts the file system to r/w automatically
adb shell "command"
-> executes "command" and returns to the computer shell
adb shell
-> opens a shell session on the phone (from here on you have to be very careful! Also you can execute now normal linux commands like rm, mv, ls, chmod and so on, but not cp (this can done through busybox)). You will have to use this more often, so get used to it ;)
1.2 Do I have to create a goldcard?
I read this question quite often. For rooting, you don't need it, but for SIM-locked phones you can't flash custom unbranded ROMs (I think).
A guide to create a goldcard follow this link: http://forum.xda-developers.com/showpost.php?p=5179788&postcount=1 (thanks to MiSSigNNo to this point)
1.3 Tools you need
A complete set of tools can be found here Feel free to mirror it:
http://rapidshare.com/files/403766494/Tattoo.rar.html
This package contains:
- adb binaries for Windows (sorry Linux users )
- su (Please note: use the su-binary attached in this post, not the one in the archive!!!!!)
- m7 exploit
- Amon_RA recovery.img
- mainfram3 boot.img
- flash_image binary
- tattoo-hack.ko
1.4 The automated way
This method was created by maverixx and can be found here. This basically consists of a package doing everything you need by itself. It roots the phone and flashes maverixx recovery.img, which (no offense) I don't like as much as I like Amon_RA's one!). Just click the batchfile and it does the rest (you have to connect your phone via USB to your PC though ).
If you want to use the automated way, but flashing Amon_RA's recovery, just replace the recovery.img from maverixx' package with the recovery.img provided in my archive file (see 1.3 for the link).
In my time here I noticed quite a few users experiencing problems either with a fully functional su or with the recovery image not flashing certain update.zip packages. It seems to be a matter of luck.
1.5 The manual way (recommended by the author)
I personally like what is done when and how, that's why I recommend the manual way. So let's get down to business Let's see if you know all the adb-commands I wrote here:
1. Let's say you have everything unpacked into C:\Tattoo
2. In your terminal (on your PC) type:
- adb shell "mkdir /data/local/bin" (if it returns an error it means that the directory already exists, just proceed)
- adb push m7 /data/local/bin/
- adb push su /data/local/bin/
- adb push flash_image /data/local/bin/
- adb push tattoo-hack.ko /data/local/bin/
- adb push recovery.img /sdcard
- adb push boot.img /sdcard
3. We have every needed file on the phone now. Type now (we are still in your terminal):
- adb shell
$ cd /data/local/bin
$ chmod 766 m7 (I don't retain this step as mandatory, so if this process fails, just proceed)
$ while ./m7 ; do : ; done
lots of text until you see something like "wrote shell code", press enter 2 or 3 times enter to see:
#
4. Then perform this:
- # export LD_LIBRARY_PATH=/system/lib
- # export PATH=/system/bin
- # insmod ./tattoo-hack.ko
- # mount -o rw,remount /dev/block/mtdblock5 /data
- # mount -o rw,remount /dev/block/mtdblock3 /system
- # cat ./su > /system/bin/su
- # chmod 4755 /system/bin/su
- # chmod 755 ./flash_image
Click to expand...
Click to collapse
Questions?
1.6 Problems and (hopefully good) solutions
Q: How do I execute my command line tool?
A: On your Windows host, go to Start->Run...->type "cmd"
Q: Where is my adb? When I type it in my shell it says that it was not found!
A: The adb binary is found in the archive I supplied above or in the Google SDK. As my archive-file is quite smaller than the Google SDK you should take mine. Let's suppose your adb binary is unpacked in C:\Tattoo, then type:
Code:
Your\Current\Location> cd C:\Tattoo
C:\Tattoo> adb <command>
Q: adb says "error: device not found" when I try to launch the shell on the phone!
A: Connect the phone with the usb cable and make sure the sd card is not mounted as drive on your PC!!!
Q: When I want to copy something the phone returns that "cp" is not found! Also when I try to move a file, it says "cross-link device".
A: Well, copying from one partition to another is only possible either via busybox or via
Code:
cat file > /location/filename
Example:
cp /data/su /system/bin
is realized by typing
cat /data/su > /system/bin/su
Also make sure that system is r/w!!!
Q: flash_image returns write errors when flashing recovery/boot image!
A:
For boot: Try to redo the flash procedure
For recovery: Note that you can't flash the same recovery.img as the one already installed, so install another recovery.img first (like maverixx) and then Amon_RA's again. If it still doesn't work reboot, remount the partitions r/w, insmod tattoo-hack.ko and retry flashing.
Q: How can I unroot my device?
A: Just delete su from /system/xbin and restore the old boot.img. Alternatively see here for retrieving a stock ROM to flash it on your phone.
PM me with more questions and I'll post them with the possible solution.
1.7 References
- Zecanilis EXCELLENT Root-Recovery-Flash images thread
- maverixx' One-click root method+recovery thread
- Coburn64's Newbie guide for manual rooting (recommended reading!)
2. Flashing images/ROMs
2.1 What is a recovery image
A recovery image is not only useful to flash custom ROMs on your device. It also enables you to backup your entire phone contents to restore it completely in case of a brick, if anything should happen...especially SIM-locked mobiles should be backed up as soon as possible. Also many recovery image modders add several non-standard features like mounting the SD card while in recovery mode or enabling adb support, etc.
2.2 What is a boot image
The boot image not only contains the kernel which brings up your Tattoos, it only can be modified to load up modules enabling ext2/3 support, loading camera, remapping read only code to an r/w area (tattoo-hack.ko), etc. Without a working boot.img, don't even bother trying to boot the phone (maybe if you do a logcat it returns something useful to solve this problem )
2.3 How to flash/tools needed
Execute steps 1 to 4 in topic 1.5 first!
5. Now comes the hard part:
- # ./flash_image boot /sdcard/boot.img
- # ./flash_image recovery /sdcard/recovery.img
it can be that flash_image reports errors in the last step (recovery.img step), but another user said it would be still working to boot to recovery...but to be sure (if you got the error!!!) flash maverixx recovery.img and then again the one I supplied in my archive (Amon_RA)
Reboot once and when you connect with adb to your phone you should see the difference
Click to expand...
Click to collapse
2.3.1 Creating a Goldcard
This is a post I took from MiSSigNNo, kudos to him:
Creating the Gold Card:
[...]
4. We need the android-sdk tools, we can find them here: http://developer.android.com/sdk/index.html download them, and unzip in a folder maybe in C:\androidtools
5. Go the the Command line (Start->Execute->write cmd and OK), and there you should find where you unzip the android-sdk tools, example cd c:\androidtools\tools
6. Run this command "adb shell cat /sys/class/mmc_host/mmc1/mmc1:*/cid" if you had the microSD in the drive you will find a long number like:
532600bd227d9c0347329407514d5402
7. Go to this page to reverse it: http://hexrev.soaa.me/ and copy the code reversed:
In our example it will be: 00544d5107943247039c7d22bd002653
8. Go to this page to generate your GoldCard image: http://revskills.de/pages/goldcard.html
And put your reversed number and you email. You will receive an email with a file called "goldcard.img"
9. Now you need an Hex editor like HXD. Download it from: http://download.cnet.com/HxD-Hex-Edi...html?tag=mncol
10. Exactly the same as the instructions I pasted above:
11. Install and launch HxD Hex Editor program. (make sure you use "Run as Administrator" under Vista and win 7)
12. Go to Extra tab > Open Disk. Under Physical disk, select Removable Disk (Must be your SD card), uncheck “Open as Readonly), click OK. (BEWARE, MUST BE UNDER PHYSICAL DISK NOT LOGICAL DISK, THIS MISTAKE MADE ME BIG PROBLEMS)
13. Go to Extra again, Open Disk Image, open up goldcard.img which you’ve saved/unzipped earlier.
Now, you should have two tabs, one is your removable disk, the other is goldcard.img. Press OK when prompted for “Sector Size” 512 (Hard disks/Floppy disks), click OK.
14. Click on goldcard.img tab. Go to Edit tab > Select All, edit tab again > copy.
15. Click on the “removable disk” tab. Select offset (line) 00000000 till offset (line) 00000170 (including the 00000170 line), click on Edit tab and then Paste Write.
16. Click on File > Save. now you can exit the program. You now have a gold card.
[...]
Click to expand...
Click to collapse
2.4 Where can I get an overview of the existing ROMs?
Look it up here (Excellent work liderzre)
2.5 Problems during flashing and solutions
Q: HEEEEELLLPPP! flash_image says that it couldn't write to some memory addresses! What can I do?
A: Don't panic. First make sure to have loaded tattoo-hack.ko, remounted system and data to r/w and then try again with another recovery.img (either maverixx or Amon_RA). Flashing the same recovery.img again WON'T WORK!!!! That's why you have to take a little detour by first flashing another recovery image.
Q: How do I boot to recovery??
A: Type in your command line while the phone is plugged in:
Code:
adb shell "reboot recovery"
. If this doesn't work, turn off your phone, hold down the home-button and press the power-button. Then when the Tattoo logo can be seen, release the home button and the recovery screen should be seen
2.6 References
- Zecanilis EXCELLENT Root-Recovery-Flash images thread
- maverixx' One-click root method+recovery thread
3. Information about the Tattoo/Useful stuff
3.1 How to install busybox?
Load the busybox binary here (select the one with arm6 at the end). Put this binary onto your data or system partition (I suggest /system/xbin) and now there are two ways to install/enable it. See below
Method 1 (will extract EVERY FEATURE, but consumes A LOT of your disk space so be careful or switch to method 2)
Do this in your command line:
Code:
adb remount (make it r/w if not done already)
adb shell "mkdir /system/xbin" (create dir if it doesn't exist)
adb push busybox /system/xbin (please make sure to have busybox in the same directory as adb ;) )
adb shell
cd /system/xbin
./busybox --install
Method 2 (saves your precious disk space )
Do this in your command line
Code:
/system/xbin/busybox --install -s /system/xbin
3.2 Can it perform multitouch?
Nope, the Tattoo has a resistive touch screen, which is known to be NON-multitouch...newer generation or high-end phones usually have capacitative screens. My suggestion is not taking the Nexus One anymore, since their touch screen type supports only 2 fingers at once, while phones like the Samsung Galaxy S have a SUPER responsiveness and sensibility (and of course 10 fingers support).
3.3 How to increase battery life?
Okay, here are little tips how to increase battery life - mine holds 7 to 8 days and I surf, call ppl and sms almost every day:
1. Flash either fyodor 0.6.4.2 or Abyzou 2.1.9 - my favourite is fyodor ones (if I still would have a Tattoo, of course )
2. Download APNd roid from the market or here and disable your 3G Internet connection (for activating it, just start the program again!)
3. If you see that you have NO RECEPTION AT ALL in one place (at work for instance), turn off your phone as this will DRASTICALLY decrease battery life because the phone tries constantly to search for a network it can log on to.
4. Try to keep your phone in normal temperature areas (between 20 and 27 degrees celsius = 68 - 80.6 degrees fahrenheit)
5. Kill unneeded apps automatically (there are quite a few apps doing this)
3.4 Using own ringtones for calls/sms
Create a folder called "media" on the root of your SD card and a sub-folder called "audio" there you have to create one folder called "notifications" for SMS and "ringtones" for call sounds. Place every desired track into these folders and reboot your phone. You should see the entries now when choosing ringtones. Alternatively just load "Ringo Pro", a really powerful tool also able to display SMS pop-ups and much more.
3.5 How to disable data transfer with a custom ROM?
As already explained above, load APN droid from the market or here.
3.6 How to make the Tattoo ring louder?
There is a little app called "Louder Volume Hack" enabling your phone to ring much louder than normally. You can load it on any popular w*rez-site Unfortunately I cannot enter the link to the app here or PM it. Any questions requesting a link to this app will be deleted instantly, so don't bother trying and use Google. There are several buttons displayed, but for better visibility I suggest enabling the Widget and hacking the system there. Also please note that ROOT access is required!! Refer to section 1 to root your phone.
3.7 How to replace the home screen?
There are two ways to do it. Method 1 is the easier one, but runs the Google Launcher and the replacement laucher in parrallel, which implies more CPU usage and battery drain. Method 2 is the more brutal one, but enables you to run just one launcher.
Method 1:
Install the replacement home app and press the home button. A dialog should appear asking you which Home Launcher should be used.
Method 2:
Put your home replacement apk onto the root of your SD and make sure you have busybox installed and /system mounted as writeable. Rename the Home replacement apk to Launcher.apk and fire up adb shell:
Code:
mv /system/app/Launcher.apk /system/app/Launcher.apk.old && mv /system/app/Launcher.odex /system/app/Launcher.odex.old && cp /sdcard/Launcher.apk /system/app && chmod 755 /system/app/Launcher.apk
Should be a pretty generic approach
3.8 Disabling xxx-synchronisation with Google-servers
Go to settings, data synchonisation and disable the entries you don't want to have synch'ed with Google. Since it's long time ago since I did this (remember that I don't own a Tattoo anymore) the procedure can be slightly different from ROM to ROM.
3.9 Backing up apk's and data to your PC
By popular request, here a topic about how to backup apk's and their corresponding data manually (can be done separately, too if you want just one of the two). Doing it with the tar command HOPEFULLY preserves also all permissions!!! Check it:
Hit up adb shell and make sure have busybox:
Code:
for the apks
# tar -cvf /sdcard/dataAppsBackup.tar /data/app
for the data
# tar -cvf /sdcard/dataDataBAckup.tar /data/data
If you want to decompress these files again do:
Code:
# tar -xvf /sdcard/dataAppsBackup.tar -C /data
# tar -xvf /sdcard/dataDataBackup.tar -C /data
Note that these files won't be compressed! If you want to save some disk space on your SD then add the parameter 'z' (without the quotes) in the tar arguments (e.g. tar -cvfz for compressing and tar -xvfz for decompressing)
3.10 How to enable more languages on my mobile?
There is an app called MoreLocale in the market enabling you to select more languages. Download it, it's free
3.11 How to manually delete system apks? Alternatively with GUI?
For deleting manually you only need root-access. With GUI you need RootExplorer (buy it or do what you need to do to get this app-but with these features I would suggest to buy the app ).
Note: I do not take any responsibility if you delete the wrong apk and you lose any functionality of the phone. Do this only if you know what you're doing!
The manual way:
Connect the phone via USB, fire up adb shell and type:
Code:
insmod /LOCATION TO [URL="http://TATTOOHACK.KO/tattoo-hack.ko"]TATTOOHACK.KO/tattoo-hack.ko[/URL]
mount -o rw,remount /dev/block/mtdblock3 /system
cd /system/app
rm NAMEOFAPK.apk
The GUI way:
Install RootExplorer, open it, navigate to /system/app and press the little "Mount R/W" button at the top of the screen and begin deleting
4. Dev-Goodies
4.1 Modifying update.zips and resigning them
See this thread and get enlightened
4.2 Modifying resources in apk-files and resigning them
Same procedure as above:
1. Extract the file with WinRAR/WinZIP, delete the contents of META-INF and start modifying what you have to modify
2. Pack everything again into a ZIP file and sign it with the signapk.jar file (can be found somewhere in the forum or here). The syntax of how to use this can be found in the last link (yes, it's only 10 KB ).
4.3 Installing apks via adb for getting exact error codes if installation fails
Prerequisites: Either know the exact path to the apk or put it into the same directory as your adb executable and hit up your command line:
Code:
adb install /path/to/apk/file.apk
OR
adb install file.apk (implies that apk is located in same dir as adb)
4.4 Everything related to ROM cooking
Check this link (thanks to Decad3nce) and this one (thanks to mxlaser).
5. Things I will do better in this thread due to user request
- Nothing
The end for now.
Note: If you think that my thread is good, then please rate it with 5 stars
Changelog:
Version 1.0
- Initial draft
Version 1.1
- Added complete topic 1 now
- Fixed layout and some typos
Version 2.0
- Added complete topic 2 and half of 3
Version 2.1
- First prototype with all topics finished (will rework parts which are not quite understandable)
Version 2.2
- Added new question to 1.6
Version 2.3
- Added section 4.4 -> Everything related to ROM Cooking DUDEEEESSSSS
Version 2.4
- Added 3.11 How to manually delete system apks? Alternatively with GUI?
Version 2.5
- attached working su file - thanks to lovenemesis for this
Version 2.6
- added some mirrors for the Tattoo.rar archive - thanks to emb0re for providing some space
Version 3
- added topic about creating gold cards (2.3.1)
hi
very good initiative stuck
Great work
Very intuitive guide for beginner.
Though as an experienced and new android application developer, it really took me a whole afternoon to understand every step of the whole process. I am sure this guide would save many others wonderful Saturday afternoon.
Nice Work
Great Work From You Sir. This Will Be Useful for Beginners I Think This Will Save Lot Of Our Time's. And Mods Too
Thanks for the feedback...I hope that I can fill many topics tomorrow
P.S.: Indeed this is meant for the many unexperienced users who desperately want to flash custom ROMs but don't know how to do it...this also spares a lot senseless thread-posts I hope...^^
Dude
SSj Man Can You Add Tutorial Abt How to get the Apk file which i download from market in my mobile. if that is possible
3. We have every needed file on the phone now. Type now (we are still in your terminal):
- adb shell
$ cd /data/local/bin
$ while ./m7 ; do : ; done
lots of text until you see something like "wrote shell code", press enter 2 or 3 times enter to see:
#
Click to expand...
Click to collapse
For me I need to add execute permission for m7 before expolit, with
Code:
chmod 766 m7
.
jagan_3400 said:
SSj Man Can You Add Tutorial Abt How to get the Apk file which i download from market in my mobile. if that is possible
Click to expand...
Click to collapse
You mean getting the apk from your mobile on your PC for example?
lovenemesis said:
For me I need to add execute permission for m7 before expolit, with
Code:
chmod 766 m7
.
Click to expand...
Click to collapse
Hm, normally when you push the file via adb it will have user permissions, which includes execution...but I will add it to exclude any possible error...thanks for the info.
It might be worth to mention this in 3.1 Busybox installation:
Code:
adb push busybox /system/xbin/
I accidentallly use "adb push busybox /system/xbin" without the ending "/". Well, you know the rest part of the story...
Hmm, probably this one first, at least for the stock HTC ROM
Code:
adb shell "mkdir /system/xbin"
PS: Kind of weird for its name xbin, not the usual sbin on desktop linux. ;-)
TheSSJ said:
You mean getting the apk from your mobile on your PC for example?
Hm, normally when you push the file via adb it will have user permissions, which includes execution...but I will add it to exclude any possible error...thanks for the info.
Click to expand...
Click to collapse
Maybe it's because I am using a Fedora box, which the default permission for files in $HOME does not include execution.
lovenemesis said:
Hmm, probably this one first, at least for the stock HTC ROM
Code:
adb shell "mkdir /system/xbin"
PS: Kind of weird for its name xbin, not the usual sbin on desktop linux. ;-)
Click to expand...
Click to collapse
You're right, I added it already in the guide, thanks for the feedback. Well, /system/xbin isn't a "normal" directory indeed, but it was created for extra executables which normally aren't shipped in stock ROMs (like busybox).
4. Then perform this:
- # export LD_LIBRARY_PATH=/system/lib
- # export PATH=/system/bin
- # insmod ./tattoo-hack.ko
- # mount -o rw,remount /dev/block/mtdblock5 /data
- # mount -o rw,remount /dev/block/mtdblock3 /system
- # cat ./su > /system/bin/su
- # chmod 4755 /system/bin/su
Click to expand...
Click to collapse
I suppose after this step the stock ROM is rooted. Right?
But in Android Terminal Emulator gives me $ still. "su" reports an link_image error, which basically said about missing libbinder.so library.
Is it normal or I need to push an libbinder.so to /system/lib as well?
BTW: "adb shell " gives me # straightly.
Regards,
Hmm, I pushed another "su" binary to overwrite the one in Tattoo.rar. And now it works fine in Android Terminal Emulator.
Here is the su binary I use:
View attachment su.zip
Oops, Titanium Backup still refuses to work despite of working "su" binary.
What else should I do?
market not working
hi
i dont know why but the Market does not work for me can u give any solutions for the same im just not able to log in it keeps saying error i also tried with google mail and gmail id but no luck any suggestion pls
few questons kindly answer
hi
i have afew questions can u kindly answer
1. is wipe a must before flashing a new rom
i have flashed the Modoco rom and it was mentioned that this was not needed but i have read in many threads asking to do the same before flashing
2.to bring back contacts after flashing new rom can i use
a. backup pro or titanium backup
b. can i just use the out look sync and get back my contacts from my PC
3. if i restore the stock rom and latter on want to try one of the cooked roms do i need to do the rooting again ie does flashing stock rom remove the rooting
Note : i have been a WM user new to AM is why im asking such questions in the WM i have one app pim backup which would get back all my contacts in 1 min and when flashing any WM it will automatically wipe all the data from the phone this does not seem to be the case with AM is why i have asked above Questions
thanks in advance
lovenemesis said:
Oops, Titanium Backup still refuses to work despite of working "su" binary.
What else should I do?
Click to expand...
Click to collapse
Titanium Backup needs Busybox and su to work. If Titanium Backup tells you that it found BusyBox, then try to copy "su" to the following to locations:
/system/bin and /system/xbin
I think with the first it should work then.
haree said:
hi
i dont know why but the Market does not work for me can u give any solutions for the same im just not able to log in it keeps saying error i also tried with google mail and gmail id but no luck any suggestion pls
Click to expand...
Click to collapse
Do you use MoDaCo ROM or did u switch now to another? Normally the phone asks for log-in credentials when going online. When you enter them correctly, the login window should disappear and you should be able to access market...I know this sounds stupid, but check if you entered you PW correctly!
haree said:
hi
i have afew questions can u kindly answer
1. is wipe a must before flashing a new rom
i have flashed the Modoco rom and it was mentioned that this was not needed but i have read in many threads asking to do the same before flashing
2.to bring back contacts after flashing new rom can i use
a. backup pro or titanium backup
b. can i just use the out look sync and get back my contacts from my PC
3. if i restore the stock rom and latter on want to try one of the cooked roms do i need to do the rooting again ie does flashing stock rom remove the rooting
Note : i have been a WM user new to AM is why im asking such questions in the WM i have one app pim backup which would get back all my contacts in 1 min and when flashing any WM it will automatically wipe all the data from the phone this does not seem to be the case with AM is why i have asked above Questions
thanks in advance
Click to expand...
Click to collapse
1. As I told you via PM already: If the ROM is based on the same source ROM (HTC stock in your case) then a wipe is NOT required, but if you switch android version (AOSP, Vanilla, FroYo, Eclair) then you HAVE TO wipe.
2.
a) I had only problems with Titanium backup concerning restoring contacts. I would suggest using MyBackup Pro
b) Well, if you can sync to outlook, then I suppose yes, but I really doubt that these features are implemented in custom ROMs...
3. Well, if you mean restoring the NAND-backup and then flashing another cooked ROM (which are all rooted by default ), then no - you don't need to re-root. Only if you would flash the original/official HTC ROM which comes shipped as exe-file, but I don't see the sense in flashing this one...use your NAND-backups
TheSSJ said:
Titanium Backup needs Busybox and su to work. If Titanium Backup tells you that it found BusyBox, then try to copy "su" to the following to locations:
/system/bin and /system/xbin
I think with the first it should work then.
hi
thanks buddy for patiently answering all my Q
i got it now but i dont know why this Bl***dy market does not work what every i try ie when the net is on and ur browsing u see the E on ur phone screen and then the 2 white arrows flash this it self does not happen when i try to log in to market
just dont know what is wrong
right now im using Modoco and happy with it seems to be real fast and everything is working on this ROM
Click to expand...
Click to collapse

[REQUEST] Can someone post a guide to how to get Froyo on eMMC?

I don't want to dual-boot, even, just have a nice "normal" Nookie Froyo install on eMMC. I've seen several allude to the fact that it worked for them but no reviews of how they did it. I've backed up my 2.1 install with Clockwork so I'm not really worried about that.
TIA.
It's quite simple actually. All you need is basic knowledge of adb.
All disclaimers apply, I'm not responsible for any damage. Just know that mine is running on internal partitions. And the SD does mount too!
Before doing anything, I would recommend applying a dd from your partitions to your pc.
With, for example on mmcblk0p1 (boot) adb: dd if=/dev/block/mmcblk0p1 of=boot.img
You should do that for each partition to be safe (0p1 to 0p8).
All the following commands can be execute one after one, the separations are only there to makes things a bit more clear.
Then,
Boot to a working Nookie (NF) with your uSD fresh from burning, without any google apps, and without any uSD damaged errors.
Empty your internal system and copy uSD system over, by doing:
- adb shell mount -o remount,rw /dev/block/mmcblk1 / (---there is a space after the 1---)
- adb shell
- mkdir tmpfolder
- mount /dev/block/mmcblk0p5 tmpfolder
- cd tmpfolder
- rm -r * (---note that there is space after the r---)
- cd ..
- cp -r system/* tmpfolder (---this will take a few minutes---)
- umount tmpfolder
Click to expand...
Click to collapse
Then, you need to boot push the attached files (bottom of post) except for the 2 vold files to your boot partition: mmcblk0p1. Unzip, copy content, not zip.
You could very well replace uImage with the new Quickie overclocked uImage for froyo (see dev thread).
To push attached files to boot, do:
- mount /dev/block/mmcblk0p1 tmpfolder
- exit
- adb push [folder-containing-4-attached-files-except-vold.fstab] tmpfolder
- adb shell
- umount tmpfolder
Click to expand...
Click to collapse
I would also recommend erasing all your data. But that's up to you, if you want to keep your data on it. In any case, you can revert back with the data.img you created above . So next part you could skip, haven't tried skipping personally:
Non mandatory, but you could do:
- mount /dev/block/mmcblk0p6 tmpfolder
- cd tmpfolder
- rm -r *
- cd ..
- umount tmpfolder
Click to expand...
Click to collapse
Then you need to push vold.fstab and vold.conf (unzip volds, copy content) to system/etc
Copy vold's to system/etc:
- mount /dev/block/mmcblk0p5 tmpfolder
- exit
- adb push [folder-with-vold's] tmpfolder/etc/
- adb shell
- umount tmpfolder
- rm -r tmpfolder
- exit
Click to expand...
Click to collapse
Then shut down, remove uSD, and boot.
Again, you can choose to push the Quickie uImage, I you prefer, but the accelerometer doesn't work with it at the moment. The 950 kernel does sometimes crash on boot, but once booted is quite stable.
I think that's all folks. I could have been a bit vague at some times, but this should work. And if you made your imgs as recommended, you're bullet proof.
To revert back to initial state with img files, you need to copy files to sdcard and then dd:
- adb shell mount -o remount,rw /dev/block/mmcblk1p1 sdcard
- adb push XXX.img sdcard (--could take a few minutes--)
- dd if=XXXX.img of=/dev/block/mmcblk0pX
Click to expand...
Click to collapse
Do that for each partition.
For those who don't feel up to the task, I could make a CWR flashable zip file of all this. The only thing is, CWR dosen't boot on Nookie just yet. So you couldn't restore with a zip after the change.
[Before doing anything, I would recommend applying a dd from your partitions to your pc.
With, for example on mmcblk0p1 (boot) adb: dd if=/dev/block/mmcblk0p1 of=boot.img
You should do that for each partition to be safe (0p1 to 0p8).
[/QUOTE]
I am a little confused here. What are the names of the 7 other partitions? Thanks, Great guide btw!
See here.
Do you see improved speed and touch response running nookie from emmc?
im getting a "No such file or directory" error after "adb push [folder-with-vold's] tmpfolder/etc"
I created the directory but now it looks like i am stuck at the landscape android splash screen on boot...
any ideas? I am attempting to redo the whole process again just incase i missed something.
Sorry, there's a slash after etc.
Make sure you've copied the systen files, with "ls" inside tmpfolder where you copied system. Should be a etc folder there.
Sam
to the op: I'm not knocking you here, but do you have a basic idea of generic linux file hierarchy or operations in general? Getting a basic grasp on working with files in a linux terminal will make all of these operations make a lot more sense, since most "adb shell" commands are basic linux commands.
FastCR said:
to the op: I'm not knocking you here, but do you have a basic idea of generic linux file hierarchy or operations in general? Getting a basic grasp on working with files in a linux terminal will make all of these operations make a lot more sense, since most "adb shell" commands are basic linux commands.
Click to expand...
Click to collapse
Thanks but I don't see how that comment adds anything here.
Looks like the issue is above commands copy the actual system folder (not the contents of the folder) To the root of the partition. ls shows the folder "system" not the contents including etc. They are inside the folder but if the partition is mounted as system then the folder is redundant. Will check copying the contents and see if that helps.
Once I get it working in will post back to let others know
**** in the first block of code replace
Code:
- cp -r system tmpfolder (---this will take a few minutes---)
with
Code:
- cp -r system[B]/*[/B] tmpfolder (---this will take a few minutes---)
many thanks!
FastCR said:
to the op: I'm not knocking you here, but do you have a basic idea of generic linux file hierarchy or operations in general? Getting a basic grasp on working with files in a linux terminal will make all of these operations make a lot more sense, since most "adb shell" commands are basic linux commands.
Click to expand...
Click to collapse
Why would you go out of your way to say that? It's not constructive. As a junior member with three posts and 0 thanks after a year and a half, sharpen your teeth here at XDA before you act like a big shot.
Right thanks. Changed it.
Has it worked for you?
Sent from my HTC Desire using XDA App
samuelhalff said:
You could very well replace uImage with the new Quickie overclocked uImage for froyo (see dev thread).
Click to expand...
Click to collapse
Are you certain on this part? Last I read in that thread, Froyo needs a different minimum kernel.
UPDATE: Nevermind, I missed this updated effort.
Homer
Well, last time I checked, my NC was running at 950 on froyo with setcpu.
Check the forum. There's a nookie version of quickie. Except accelerometer doesn't work..
First, huge thanks to the second poster - great guide! Can we sticky this?
Second, yes I know what dd does, etc, I've been working with Linux for about ten years . I just don't know the ins and outs of embedded devices yet.
samuelhalff said:
Right thanks. Changed it.
Has it worked for you?
Sent from my HTC Desire using XDA App
Click to expand...
Click to collapse
yeah i was up till 4am last night but got it working. first i tried to use my existing nf sd card... bad idea. would boot from emmc to the touch android screen to begin, but could not get past. i assume it was the issue on nookdevs because wifi was not enabled. so i removed the setupwizard.apk but somehow bricked and was unable to boot from emmc. so i took the following steps to get things working properly:
1. reimage boot and system from the stock 1.0.1 images and reset the nook to stock, didnt even touch. at the intro screen i just powered it off.
2. next i took a fresh nf sdcard and run steps from your post(with the correction to copy system contents)
3. from there i had a working nf from sdcard! i did my tweaks (google apps, market fix and button remapping from nookdevs froyo tips)
i might to put together a post with a more verbose set of instructions for a one stop froyo shop but if i do i will be sure to give you credit for your contribution.
thanks again!
Hi,
Second, yes I know what dd does, etc, I've been working with Linux for about ten years . I just don't know the ins and outs of embedded devices yet.
Click to expand...
Click to collapse
Well, that's a nice contrast. I've been working on Linux/Android for about 2 months now
I should have mentioned that the NF uSD Card must be a newly burnt image, without all the nookie tips added to it. Of course, your Google framework will crash if you port it without your data.
By the way, there's a nice trick to get past the numb android interface, simply touch every corner of the screen, starting with top left and going clockwise. You'll then be sent the your home screen, and from there you'll log on to google account again.
I think the best way of doing it would to create a flashable .zip, which I'll make tonight if I find the time and if people are really interested. But don't forget CWR dosen't work on nookie for the time being. The only way back would be through adb.
So, does anyone wish to have a flashable zip of this? Or will it be a waist of time?
Sam
samuelhalff said:
Hi,
Well, that's a nice contrast. I've been working on Linux/Android for about 2 months now
I should have mentioned that the NF uSD Card must be a newly burnt image, without all the nookie tips added to it. Of course, your Google framework will crash if you port it without your data.
By the way, there's a nice trick to get past the numb android interface, simply touch every corner of the screen, starting with top left and going clockwise. You'll then be sent the your home screen, and from there you'll log on to google account again.
I think the best way of doing it would to create a flashable .zip, which I'll make tonight if I find the time and if people are really interested. But don't forget CWR dosen't work on nookie for the time being. The only way back would be through adb.
So, does anyone wish to have a flashable zip of this? Or will it be a waist of time?
Sam
Click to expand...
Click to collapse
I would love a flashable .zip. I think many others would as well.
starkruzr said:
I would love a flashable .zip. I think many others would as well.
Click to expand...
Click to collapse
Can't wait for a flashable zip. Maybe even some cm7 release candidates would make me real happy.
Sent from Nooted NookColor using XDA App

[MOD] Full Ubuntu on the Atrix (now fully automated: 4.1.26/4.1.52)

----- Announcements -----
Closed in favour of this thread.
As noted in the poll, interest is high enough in a union filesystem that it will be the next thing investigated. Unfortunately, anybody who wants to move from any version 1.x or earlier of this script will probably need to re-install everything for version 2.x, as the way the target filesystem is designed is going to change dramatically. Sorry.
There's a typo that jdkramar found, but I expect that most of you won't hit it (unless you've modified your /etc/sudoers), and those that will know enough to fix the script.
----- Your regularly scheduled post below. -----
For those users who have requested a full Linux on their Android device, I now present a relatively easily upgradable Ubuntu on the Motorola Atrix. It's not perfect, but it's surprisingly good.
There are a number of problems we have with the webtop environment that we would like to address in order to have "proper" Ubuntu, including (additional explanation below about each of these points):
The restrictiveness of the environment Motorola's set up (easy to bypass).
A lack of disk space to do anything (only having ~80 MB free really hurts).
An unwillingness to create a third Linux-based environment.
A non-functional apt/aptitude (easy to fix).
Note: This is different than the "webtop over HDMI sans dock" effort. If you're looking for that, please look at this other thread instead. Although unrelated, they shouldn't conflict with each other.
Caveats:
You will be hacking your device. The base script that modifies your device has been reasonably well tested and operates with a decent level of paranoia, so it is highly unlikely that the script will break anything. However, any software you install after you have access to a full Ubuntu presents a very real chance that you will either soft-brick your device or get it into an infinite reboot loop, particularly if you don't know what you're doing. Having a decent knowledge of Unix/Linux is recommended if you wish to proceed. You take full responsibility for what may happen to your device if you execute this script.
You'll need a rooted Atrix in order to do this*, although I doubt anyone's surprised about that. The attached setup script takes care of the steps in post #4, but you should note a few things:
Before you execute the script:
In response to the request that threads indicate whether or not this will work on any Motorola Atrix, it should. If you'd like verification, send me the output of "/usr/bin/dpkg-query -l" on your Atrix's unmodified Ubuntu, and I can double-check. So far, this is verified to work on:
AT&T (me! )
Bell
The script will create a 1 GB filesystem file in /data, so you'll need to have at least that much free space there.
Before running the install script, you'll need to have seven or less apps in the Media area. You can check this by going to Settings → Applications → Manage applications, then checking the Media area tab. The number of apps there will need to be seven or less. If you have more than that, temporarily uninstall apps or move them back to the phone (you can move them back after the script runs and reboots).
While you execute the script:
When the script asks question, it offers reasonably "sane" options by default (although it does try to be safe).
Resetting a filesystem file means that it will use the file that's already there, but set it back to match your original /osh partition. It's generally quite a bit faster than deleting it and recreating it, but deleting it is sometimes the right decision (like if you want to change its size).
The script asks about your MAC (mandatory access control) files because it can't be sure that you haven't altered your original files to your taste. If you have no idea what that sentence just said, pick either the very permissive or somewhat permissive MAC configuration files (the former should cause you fewer headaches).
If you haven't altered your AWN configuration (the tray at the bottom), I suggest you install the modified app launcher configuration (which is the default). If you have altered the configuration, the script won't ask, assuming that you'd like to keep your current one.
Since the setup script downloads Ubuntu packages on the fly (it made more sense than trying to have a giant archive with all of the packages embedded in it), the quality of your connection may result in the script dying partway through. If this happens, you should just be able to restart the script; it'll start again from the beginning, but nothing bad should happen as a result. If enough people report problems with downloading packages, I'll look into a workaround.
After you execute the script:
I've seen a couple of instances where on the first reboot to the alternate /osh partition where MotoBlur thinks that the SIM card has changed. Another reboot fixes this.
For those users who have used a previous version of the script, an upgrade script(s) are included to bring you up to the current level of what's automated.
For those users who have used a previous version of the script and made changes after that, the upgrade script(s) should be able to handle those changes gracefully.
If you want to uninstall:
Using adb with root access:
adb shell
su
cd /system/bin
mv mountosh mountosh.new
mv mountosh.orig mountosh
cd /data
rm ubuntu.disk
cd /home/adas/.gconf/apps/avant-window-manager
rm -r window_navigator
reboot
Once installation is complete, you can start playing with synaptic to install packages. You may need to be careful upgrading any of the -mot/~mot versioned packages, as that can break functionality. I'm still compiling a list of which packages can be upgraded versus which can be left alone (listed below).
Here's a brief runthrough of the type of operations you can do afterwards. Upon rebooting, the webtop screen now looks like this (note the altered set of icons in the tray):
{
"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"
}
Running synaptic brings up a list of available packages:
If we're looking for a decent image viewer, eog should do the trick:
Once we install it, Nautilus (the file manager) now has an interesting option in the menu for pictures, Open with "Image Viewer":
Selecting that brings up what you would expect (moved off to the side so that it doesn't take up the entire desktop):
I haven't yet tested upgrading to Ubuntu 9.10 yet (let alone Ubuntu 10.x), but everything else looks to work fine, with the usual caveats. Further updates to come as they're available!
Changelog:
1.0.6: "By default, Wget will assume a value of 10 seconds." my foot!
1.0.5: More fixes:
Having a space in the directory structure should no longer be disruptive to the script's behaviour.
Questions are now case-insensitive.
More tweaks to the somewhat permissive TOMOYO configuration files.
If the LXTerminal binary has been deleted (as appears to be the case on Bell), it is now re-installed.
The built-in package tester is now more resilient. It supports 1.4.26 and 1.4.52 properly.
The script now asks whether the dock should just be blown away with the replacement, rather than trying to make assumptions.
1.0.4: Quite a few fixes:
Rename upgrade scripts, so that people get less confused (hopefully!).
Tweak the check for whether it's already running from the filesystem file, since the earlier check didn't actually work (doh!).
/osh/data doesn't exist by default, so have the script stop assuming that.
Tweak the pulseaudio re-install so that it's a bit more reliable.
The expected list of packages to manipulate doesn't work for 4.1.26. Set it to the 4.1.26 numbers for now, and re-factor for 4.1.52 with the next revision.
Reroute /bin/ps' stderr to /dev/null so that it doesn't pollute stdout.
The set of unmount instructions at the end need to be split up, since you can rightfully get to the end while skipping some of the mount instructions.
Prior to attempting to alter /system, ensure that it's mounted read/write.
1.0.3: Not everybody runs batch files from the command line, so add a "pause" at the end so that users can see what happened.
1.0.2: Apparently, relying on the score that aptitude returns as the check for whether or not it's okay to auto-fix things is too unreliable. So, instead, opt for the (somewhat riskier, but should be reasonable) check of the number of packages to remove/install/upgrade/downgrade. The check can be made package-specific if need be, but I'd rather have a script that I can re-use later for other upgrades if I need it.
1.0.1: If the package management auto-fix doesn't go through, it's not likely that the script will be able to install gksu or synaptic either, so those steps need to be fixed.
1.0: The "very permissive" MAC option was broken. That's now been fixed, along with completing the automation of the entire process.
0.7.2: Added a check for having a free loop device, and also re-added a "very permissive" MAC option.
0.7.1: Removing /sbin/tomoyo-init appears to cause the X environment not to load at all, so disallow that option for now.
0.7: In addition to making it slightly more user-friendly (by adding questions for when the script isn't sure how to handle a situation), it now handles through to the initial dpkg installation.
0.5.2: Dump rsync's output to /tmp/rsync.out since it takes a really long time, allowing for users to tail the output if they know how. Also, run adb kill-server at the end of the script so that the adb daemon doesn't continue to run (which makes it really annoying to try and delete the directory).
0.5.1: 0.5 had a bug where it tried to check for a return from psneuter, which kills the adb connection (so no return value could be obtained). Instead, use whoami to verify whether or not psneuter succeeded in running.
0.5: The attached script should handle up through to the rsync phase automatically. There's a considerable amount of error checking, so it should be safe to use (I've uploaded a version of the script that should take you as far as the mountosh swapping, which means that you'll now be using a different Ubuntu partition than the default).
* This is a technicality, since the script hacks your device to be able to run commands over ADB as root.
----- Donation notes -----
If you want to donate, rather than to me, why not donate to the Japanese earthquake/tsunami relief effort instead? Here are a couple of (non-attributed) pointers if you don't know where else to look:
International Federation of Red Cross and Red Crescent Societies: no minimum; USD, CHF, EUR; Visa/MC
American Red Cross: $10 minimum (ouch); USD; Visa/MC/AmEx/Discover/Amazon
Canadian Red Cross: no minimum (?); CAD; Visa/MC/AmEx/PayPal
In regards to the above list, a bit of explanation:
The restrictiveness of the environment Motorola's set up (easy to bypass).
As shown in the above steps, renaming and/or removing /sbin/tomoyo-init is all it takes to disable TOMOYO Linux. Leaving it in place isn't necessarily a bad idea, since it means that any of the standard entry points into an Atrix are reasonably locked down. The TOMOYO configuration file that I'll shortly be attaching leaves certain executables completely unlocked (those that need to be able to run anything), but finding out what's hitting up against the limits is a simple matter of setting everything to run_level 2 and checking dmesg.
A lack of disk space to do anything (only having ~80 MB free really hurts).
As I note above, 1 GB isn't much either. On the other hand, what I'm going to look into when I have that mythical thing called free time is to use my internal contacts to get a copy of the kernel source code and then see if I can build myself a FUSE module. At that point, I should be able to pull off a union mount, which should help dramatically.
We haven't figured out how to repartition the Atrix's partition scheme, so we don't have much flexibility on making the existing partition larger. Creating a filesystem file in the Internal Storage would be nice, but a) that partition (p18) isn't available when mountosh runs, and b) it'd make it difficult, if not impossible, to cleanly USB mount the partition. Creating a partition on the SD card would be nice, but a) mmcblk1 isn't available when mountosh runs either, and b) there would be similar constraints if a user ever wanted to pull the SD card.
An unwillingness to create a third Linux-based environment.
I respect what the people who are trying to create a "clean" chrooted environment are trying to do, but it feels to me that there's the whole "throwing the baby out with the bathwater" aspect here, since there really isn't that much more to do beyond what Motorola's provided. Besides of which, some of what Motorola has done with their environment isn't possible to duplicate without taking the files (like the aiw (Android In Window) package). So I would prefer to take the approach of taking the chains off the existing system.
A non-functional apt/aptitude (easy to fix).
Not much to say here, right?
The script builds a larger disk using /data as its home. The primary advantage is that we have access to it at the right point during boot. The primary disadvantage is that we don't have anywhere as much as we'd like to have (since /data is 2 GB total). But, you work with what you've got!
Known package issues:
Be careful upgrading any of the -mot/~mot packages, as that can break functionality. I'm still compiling a list of which packages can be upgraded versus which can be left alone.
Can be upgraded with loss of functionality:
libnautilus-extension1-1:2.26.2-0ubuntu1-mot1
nautilus-1:2.26.2-0ubuntu1-mot1
nautilus-data-1:2.26.2-0ubuntu1-mot1
Upgrading these packages plus at least one additional package I've not yet fully identified breaks viewing mountable storage and the ability to unmount it.
xserver-xorg-core-2:1.6.0-0ubuntu14
Using the stock xserver-xorg-core 2:1.6.0-0ubuntu14 that's already installed without recovering /usr/bin/Xorg appears to lead to a loss of the status bar at the top. This particular issue is now handled by the script.
Cannot be upgraded:
gtk2-engines-1:2.18.1-0ubuntu1~mot1
This breaks aiw (Android In Window) so that there's no frame around the window and it can no longer be manipulated in any way.
xscreensaver-5.10-6-motorola1?
xscreensaver-data-5.10-6-motorola1?
xscreensaver-data-extra-5.10-6-motorola1?
This will likely break displaying aiw (Android In Window) as the unlocking mechanism for the screensaver. Still needs to be tested.
Archived notes:
The below steps are performed by the script in the first post, but in case you really wanted to know what's going on behind the scenes....
----- The setup script takes care of steps starting here. -----
From here on until noted otherwise, all commands are assumed to be run as root (so you either are root, or you're calling every command via sudo).
First, we should make sure that there's enough free space on the device:
/bin/df -h /data
There should be at least 1.0G under the Used column. If not, you won't have enough to create a decent disk. If so, then you can keep going:
/bin/dd if=/dev/zero of=/data/ubuntu.disk bs=1024 count=1048576
/sbin/losetup /dev/block/loop7 /data/ubuntu.disk
/sbin/mkfs -t ext3 -m 1 -b 2048 /dev/block/loop7
mkdir /tmp/osh
/bin/mount -t ext3 /dev/block/loop7 /tmp/osh
At this point, we've created a 1 GB disk file (1,024×1,024=1,048,576), formatted it as ext3, and mounted it in /tmp/osh. The next step is that we need to grab a copy of rsync so that we can perform our copy. I'll assume that rync is in /mnt/sdcard-ext for now:
mkdir /tmp/deb
/usr/bin/dpkg-deb -x /mnt/sdcard-ext/rsync* /tmp/deb
/tmp/deb/usr/bin/rsync -avx /osh/ /tmp/osh/
And now we have a duplicate of our /osh partition, but with more space this time (1 GB instead of 756 MB, which isn't great, but is a hell of a lot better). And, we know how to intercept the point in init.rc where /osh is mounted so that we can redirect it. Put the following into a file named mountosh.new, then copy it to /mnt/sdcard-ext. Here's the file:
Code:
#!/system/bin/sh
# Run mountosh.orig
/system/bin/mountosh.orig "[email protected]"
# Then, mount the filesystem file over the existing /osh
# partition.
/sbin/losetup /dev/block/loop7 /data/ubuntu.disk
/system/bin/mount -t ext3 /dev/block/loop7 /osh
After that:
mv /system/bin/mountosh /system/bin/mountosh.orig
cp /mnt/sdcard-ext/mountosh.new /system/bin/mountosh
chmod 0755 /system/bin/mountosh
chown 0 /system/bin/mountosh
chgrp 2000 /system/bin/mountosh
You can now reboot your device, and you should now boot into the new partition we've just created.
----- The 0.5 version of the setup script performs up through here. -----
Here, an interesting question pops up: do you want mandatory access control (MAC) in place? In my case, I don't have a problem with it, so I can provide updated TOMOYO configuration files that reflect that. If you would prefer to disable it completely, run the following commands:
rm osh/etc/tomoyo/exception_policy.conf
touch osh/etc/tomoyo/exception_policy.conf
rm osh/etc/tomoyo/domain_policy.conf
touch osh/etc/tomoyo/domain_policy.conf
and then reboot your device again. This configures TOMOYO so that it monitors nothing.
Next, we go through and install a series of packages which are either loaded in a broken state (because Motorola force-installed conflicting packages afterward) or packages which are expected to be present. Some of these packages have specific paths listed afterward; if there are, then those files need to be backed up before package reinstallation, then restored afterward. This is important.
coreutils
cpio
dbus
/etc/init.d/dbus
dbus-x11
/etc/X11/Xsession.d/75dbus_dbus-launch
dhcp3-client
findutils
gpgv
pulseaudio
/etc/pulse/daemon.conf
/etc/pulse/default.pa
udev
/etc/init.d/udev
xserver-xorg-core
/usr/bin/Xorg
You'll need to install each package with:
dpkg -i --root=/osh --force-overwrite <package>
At this point, we can now update the list of APT sources so that we can start querying the public Ubuntu depots. Edit your /etc/apt/sources.list to have these entries:
Code:
deb http://ports.ubuntu.com jaunty main universe multiverse restricted
deb http://ports.ubuntu.com jaunty-security main universe multiverse restricted
deb http://ports.ubuntu.com jaunty-updates main universe multiverse restricted
I would also recommend that you add this line to the bottom of your /etc/apt/apt.conf.d/05aptitude file, since the reality of the situation is that we still don't have much space (it'll turn off auto-installing packages that aren't necessary but are recommended):
Code:
Apt::Install-Recommends "false";
At this point, you should be able to run the following with no problems:
apt-get update
----- The 0.7 version of the setup script performs up through here. -----
If this succeeds, we can move on to running aptitude:
aptitude
It will complain that a number of package installations are broken. This is expected, as that's how Motorola built out the distribution. The current script executes the "default" solution, which at the time of writing is four uninstallations, one downgrade, and ten installs. Also make sure that no "unnecessary" packages are uninstalled, since some of them are actually necessary.
We can then install gksu and aptitude so that we have graphical access to the package repositories from aptitude.
----- The 1.0 version of the setup script performs up through here. -----
You my friend are incredibly good. This is insane
Edit: removed huge quote...
Might be a good idea to not quote the entire massive post.
Looking forward to seeing where this goes... How well does it run?
This is great. Can't wait to try it monday. Keep up the good work.
Sent from my MB860 using XDA Premium App
how does this perform vs the included webtop mode?
CC Lemon said:
Looking forward to seeing where this goes... How well does it run?
Click to expand...
Click to collapse
lasersocks said:
how does this perform vs the included webtop mode?
Click to expand...
Click to collapse
It is the included webtop mode - it's just a matter of pulling off some of the restrictions that Motorola put on it. I should probably tweak it just a bit more to where I'm happy with it, and then I'll be able to start making suggestions on what to install. One of the things that people would probably want most is synaptic (graphical package manager), for example, and I should just have a script that installs it for people.
if you get this working, can you make a video please? would be nice to see how it is.
pure genius
can u post a video about your work ? =)
Very good work! You should join the irc sometime.
freenode
#moto-atrix
Now with more scripting!
I've added a version 0.5 of a setup script that automates some of what happens (I've denoted how far in the process it performs right now). It should print out a user-friendly version of what it's doing, in addition to what it's failing on if it fails. Appropriate notes added in the first post as well.
Sogarth said:
Now with more scripting!
I've added a version 0.5 of a setup script that automates some of what happens (I've denoted how far in the process it performs right now). It should print out a user-friendly version of what it's doing, in addition to what it's failing on if it fails. Appropriate notes added in the first post as well.
Click to expand...
Click to collapse
I'll try again. Got up until mounting new partition. Created mountosh.new copied over to phone rebooted. Didn't mount. Didn't have anything in /sbin dir. Like losetup.
Back to .sbf now. Going to try script and give it another go.
I cant wait for my Atrix I'm getting more and more excited every day seeing whats happening here
Thanks a lot for this, especially that I'm not very advanced linux user
Does the usb mice and keyboard work properly? Or other usb-stuff?
dicksteele said:
I'll try again. Got up until mounting new partition. Created mountosh.new copied over to phone rebooted. Didn't mount. Didn't have anything in /sbin dir. Like losetup.
Back to .sbf now. Going to try script and give it another go.
Click to expand...
Click to collapse
Hmm... that's really, really strange.
Edit ubuntu.bad and comment out the reboot line, then. Should just be a matter of adding rem at the beginning of that line.
Also, you shouldn't have to use the sbf. Using the soft brick recovery instructions should be enough, since all you would need to do would be to rename mountosh to mountosh.new, then rename mountosh.orig back to mountosh to get the original state back.
Sogarth said:
Now with more scripting!
I've added a version 0.5 of a setup script that automates some of what happens (I've denoted how far in the process it performs right now). It should print out a user-friendly version of what it's doing, in addition to what it's failing on if it fails. Appropriate notes added in the first post as well.
Click to expand...
Click to collapse
Shouldn't for /f "tokens=*" %%l in ('%~dp0adb.exe shell "chmod 6755 /tmp/psneuter > /dev/null 2>&1 && echo PASS"') do set retval=%%l
be chmod 0755 ? Getting error can't execute psneuter. First I thought it was because I already had one in tmp from AROOT. Trying again now.
Sogarth said:
Hmm... that's really, really strange.
Edit ubuntu.bad and comment out the reboot line, then. Should just be a matter of adding rem at the beginning of that line.
Also, you shouldn't have to use the sbf. Using the soft brick recovery instructions should be enough, since all you would need to do would be to rename mountosh to mountosh.new, then rename mountosh.orig back to mountosh to get the original state back.
Click to expand...
Click to collapse
I was running Gingerblur. Wanted to start fresh. And it wasn't from running batch file. It was before you creating batch. Tried from first post instructions. No biggie. I'm having fun !!!
dicksteele said:
Shouldn't for /f "tokens=*" %%l in ('%~dp0adb.exe shell "chmod 6755 /tmp/psneuter > /dev/null 2>&1 && echo PASS"') do set retval=%%l
be chmod 0755 ? Getting error can't execute psneuter. First I thought it was because I already had one in tmp from AROOT. Trying again now.
Click to expand...
Click to collapse
No, it's actually chmod 6755 since it's setting u+s. What's a bug in there (and I'm about to upload a fixed version) is that /tmp/psneuter actually kills the connection immediately, so it can never return "PASS". I added in a user check afterward instead.
A fixed 0.5.1 uploaded.

SD Tweakz - Run your scripts on SD at boot-time. (Plus few battery tweaks)

SD Tweakz v2
Only works on custom ROMs with init.d(aka busybox runparts) support
UPDATED 04/11/11(added a few battery tweaks)
Wondering around on XDA will sometimes lead you to threads with scripts/tweaks that may or may not help you improve your android device in one way or another. Now most of these scripts/tweaks are not boot resistant. Meaning, after rebooting the tweaks gets disabled and you need to enter/execute them once again.
Well here's another script that would help you initialize those scrips/tweaks every time you restart/reboot you phone and make your life a lot more easier.
Instructions / How does it work?
1. Download the initial script here (SD Tweakz v2)
2. Flash via recovery This will install/copy the initial script into a portion of your android system which initializes/runs every time the phone boots
3. Create a folder on SD called "scriptz" (/sdcard/scriptz)
4. Place your tweaks/scripts inside "scriptz" folder. Usefull scripts/tweaks with explanation below
5. Reboot and see your script run on boot time By this point, every time you boot, the initial script will check your sdcard(/sdcard/sctiptz) if any scripts/tweaks are present. Once found it will then run the scripts for you each and every time you boot
What is it good for
Well there are lots of tweaks out there just waiting to be discovered. Some can yield great performance and some can provide you with a better battery management that can extend your battery life for hours. Unfortunately, some tweaks can only give you one of the benefits above and a bad performance on the other. Meaning you just can't have 'em all. Here you can choose which tweaks/scripts to apply, modify the values as you want as well as debugging which script provides the benefits that you expect. Another reason for using this mod is compatibility as some tweaks/scripts can be ROM dependent. Most of the time it's a kernel issue but some libraries can get involved too.
The Scripts
Scripts are just plain linux compliant text document which has certain linux commands that can be issued using adb/terminal.
You can make one yourself using some android text editors(from es file explorer, dropbox, root explorer etc.). Don't forget to add a ".sh" file extension.
Here's a few example of the scripts I use:
Code:
#These scripts are from various sources from different sites including [URL="http://forum.samdroid.net/"]Samdroid.net[/URL]
#And of course in collaboration with FranciscoFranco
#
#My approach in the scripts/tweaks that I use is basically just to
#squeeze more juice out of my phone. So in contrast to the tweaks
#included in FranciscoFranco's thread, the tweaks/scripts I use are less
#aggressive in terms of performance and more inclined to save battery.
#
#non-rotational.sh
#this script tells android that you are not using spinning disks
DM=`ls -d /sys/block/dm*`;
MTD=`ls -d /sys/block/mtd*`;
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
for j in $DM $MTD $LOOP $RAM;
do
echo 0 > $j/queue/rotational;
done
#noatime.sh
#Remount all partitions with noatime, for more info visit [URL="http://forum.xda-developers.com/showpost.php?p=8708125&postcount=1"]http://forum.xda-developers.com/showpost.php?p=8708125&postcount=1[/URL]
for k in $(busybox mount | grep relatime | cut -d " " -f3)
do
sync
busybox mount -o remount,noatime $k
done
#scheduler.sh
#Changes the scheduler used by the system, for more info visit [URL="http://forum.xda-developers.com/showpost.php?p=4806456&postcount=1"]http://forum.xda-developers.com/showpost.php?p=4806456&postcount=1[/URL]
for i in `busybox ls -1 /sys/block/mtdblock*`
do
echo "noop" > $i/queue/scheduler;
done
echo "noop" > /sys/block/mmcblk0/queue/scheduler;
echo "noop" > /sys/block/dm-0/queue/scheduler;
echo "noop" > /sys/block/dm-1/queue/scheduler;
#setprop.sh (currently testing)
#various build.prop settings
setprop wifi.supplicant_scan_interval 600
These are few of the tweaks that I have tested(and using right now), I will update it every time I test something out and will eventually add some of FranciscoFranco's tweaks for you to try out.
You can get some useful scripts from here - Performance and battery tweaks - by Franciscofranco (just read along)
Note: These scripts are no different from the scripts in FranciscoFranco's thread, I just categorized each individual tweaks and separated them for you to be able to apply each one separately. I will be more inclined to describe only battery saving tweaks as I am only interested with tweaks that could extend battery life(this includes performance tweaks that doesn't seem to affect the battery behavior at all)
Here's the my initial script again: SD Tweakz v2
Here's the downloadable version of each tweak mentioned above:
non-rotational.sh
scheduler.sh
noatime.sh
setprop.sh
If anything bad happens, just flash this Undo.zip(unsigned so just toggle signature verification) and everything should be back as it was before.
Huge thanks to NervGaz for providing a solution to the mount point conflict issue and of course Franciscofranco for those lively discussions and ideas we exchange.
Awesome job, I already linked this on my first page
@Ungaze
what is the difference from Tweakz V2?
bluviper said:
@Ungaze
what is the difference from Tweakz V2?
Click to expand...
Click to collapse
almost everything. Flashing this script alone won't do anything. You need to get your tweaks from here first and save it to /sdcard/tweakz folder. reboot and this way it will do exactly what Tweakz V2 did. Now if you notice any lag or performance drop, apply each tweak/script one by one to debug/troubleshoot which one is causing it.
Additionally if you found anything useful, you can make your own script.sh and place it on the /tweakz folder to run it on every boot.
ungaze said:
almost everything. Flashing this script alone won't do anything. You need to get your tweaks from here first and save it to /sdcard/tweakz folder. reboot and this way it will do exactly what Tweakz V2 did. Now if you notice any lag or performance drop, apply each tweak/script one by one to debug/troubleshoot which one is causing it.
Additionally if you found anything useful, you can make your own script.sh and place it on the /tweakz folder to run it on every boot.
Click to expand...
Click to collapse
Yes please, keep posting feedback either here or the other thread. Anything is useful since some users say they suffer some ocasional lag, others don't notice improvements, others say their phone became super fast...
ok now i get it... so the first batch of scripts on zip cannot be run on boot...
thats why you created this...
..ok i have finally applied everything! hehehe since i love smorgasbords...
and its very hard to tell that its there.... hehehe.. seems like fine to me.
no hiccups whatsoever..
but i feel its OK... thanks again man..
ok now i get it... so the first batch of scripts on zip cannot be run on boot...
thats why you created this...
Click to expand...
Click to collapse
the first batch of scripts had to be manually moved to init.d and had to be in a specific filename with a specific header and containing all the tweaks altogether in order to run on boot.
now what I did with the update.zips(Tweakz V1, Tweakz V2) was make moving it to init.d, renaming and fixing the header all easier for you guys but it still contain all the tweaks with no option for you guys to modify/add/remove lines that you want. This time it already runs on boot.
with this tweak, everything is easily manipulated through the sd card and a simple file explorer for more flexibility and easy troubleshooting. This should also work on most phones with init.d support.
Yes please, keep posting feedback either here or the other thread.
Click to expand...
Click to collapse
And to make things neater, just post stuff regarding only this script here and everything about tweaks on the other thread mentioned above.
You don't really need to move the scripts to the data partition, just invoke the with sh, ie. "sh /sdcard/scriptz/script.sh" it would make your for loop something like this:
for script in $list
do
sh /sdcard/scriptz/$script
done
Also I'd be careful with mounting SD ahead of vold, atleast on /sdcard or /mnt/sdcard make a tempfolder somewhere as a mount point instead and you shouldn't to worry about vold throwing up on you... Just a thought.
You don't really need to move the scripts to the data partition, just invoke the with sh, ie. "sh /sdcard/scriptz/script.sh" it would make your for loop something like this:
Click to expand...
Click to collapse
didn't work last time i tried running the scripts directly from sdcard but will try it with your script.
Also I'd be careful with mounting SD ahead of vold, atleast on /sdcard or /mnt/sdcard make a tempfolder somewhere as a mount point instead and you shouldn't to worry about vold throwing up on you... Just a thought.
Click to expand...
Click to collapse
I don't really have a choice right now but to use the same method as "VOID rom" is using when loading modules. Any ideas?
BTW thanks so much
A quick and simple solution would be to just add something along the lines of
mount -o rw,remount auto /
mkdir /tmp
<mount the sdcard>
<run the scripts>
<unmount the sdcard>
rmdir /tmp
mount -o ro,remount auto /
Not the cleanest solution of all time, but it should work and no risk of conflicting mount points. Another solution is to just have people install the scripts on the /data partition in a directory there as /data is mounted rw.
Sent from my LG-P500 using Tapatalk
NervGaz said:
A quick and simple solution would be to just add something along the lines of
mount -o rw,remount auto /
mkdir /tmp
<mount the sdcard>
<run the scripts>
<unmount the sdcard>
rmdir /tmp
mount -o ro,remount auto /
Not the cleanest solution of all time, but it should work and no risk of conflicting mount points. Another solution is to just have people install the scripts on the /data partition in a directory there as /data is mounted rw.
Sent from my LG-P500 using Tapatalk
Click to expand...
Click to collapse
I was worried about the mount point traffic as well, but I guess I will be implementing the second solution instead, with a very different approach, and a more complex script.
You seem to know your trade, too bad we didn't get to collaborate before I made this script(from scratch, with no knowledge at all with scripting and how they work). Was asking and trolling on different threads with no help at all. Good thing mr. google was always there for anyone who needs help .
I'll start working and hope to hear from you about my next release as well.
You might want to look at the userinit script in the CM based ROM's around if you're going down that route, it does what you want and there's no point reinventing the wheel if you know what I mean.
Sent from my LG-P500 using Tapatalk
Great! Nice tip, never done that before. Thanks alot man.
so all in all, is this script really running on boot or not?
It runs, only problem encountered is with CM7 roms. (mount point traffic or something like that in a sense) will edit 1st page till I finish the reworked script.
Hey ungaze,I have just flashed the script and everything. I'm on CM7. What is the problem? Do I have to wait for a fix and do everything over again? Because I'm currently not experiencing any problems
Nope, it worked once, it should also work every time. Dunno which beta version of CM7 some people are having problem with. I still think this method is easier and faster for testing scripts to run on boot, but the next script will just be more lets say "compatible to a wider variety of ROMs and even other devices".
The issue can occur on rom's that mount the sdcard on /mnt/sdcard and symlink that to /sdcard as your mountpoint doesn't exist. If memory serves me right this is the correct mount procedure since 2.2 and is more in line with FHS. Potentially you can see issues with this if it mounts before vold runs as well as vold with throw an error if the mountpoint is in use. This can occur on rom's that mount to /sdcard. Hope that clears it up a bit.
Sent from my LG-P500 using Tapatalk
How does this look?
Code:
mount -o rw,remount auto /
mkdir /tmp
mount sd
mount -t vfat /dev/block/mmcblk0p1 /tmp
if [ -e /tmp/scriptz ]
then
list=`ls /tmp/scriptz/*.sh`
for script in $list
do
sh $script
done
fi
umount sd
umount /tmp
rmdir /tmp
mount -o ro,remount auto /
Also "ls /tmp/scriptz/*.sh" would show the complete path including /tmp/scriptz/------ and so I just used sh $script on line 10. is this ok?
No need to mount the sdcard in the script, vold handles all that and its not used anyway. Apart from that it looks good to me.
Sent from my LG-P500 using Tapatalk

[SCRIPT/MOD] Deodexed files for Bell (06/05/11)

If you are looking for how to get back to stock Bell, go HERE.​
Disclaimer: I have not tested this on anything but my phone. This is a development section of a hacking website. Make backups. Know what you are doing.​
Credits:
Brut.all for apktool
edgan for 2nd-init
designgears for aroot inspiration.
xda for being a source of info.
​
Requirements:
Windows 7 or Ubuntu 10.10+ (10.10 and 11.04 tested)
Java installed. (For applymods, it uses apktool)
Running Phone, not in recovery mode, etc.
Tips:
Don't factory reset please if something goes wrong, it just erases your personal settings, it doesn't write to the system partition. It also deletes your data partition, making it harder to get back to stock.
Early usb mode, turn your phone on while holding down the lower volume button, when it says fastboot, release and press volume down repeatedly until it says early usb enumeration, then press up volume. It takes 30 seconds or so before adb is ready.
​
Version 9:
Download it here.
What's new:
Added support for 2nd-int (WIP, tested on stock Bell only)
shsu updated to allow a super user to become a super user, acts like sh in that case.
fixed linux install_recovery.sh and uninstall_recovery.sh scripts to use shsu instead of remaining using su. Ditto with ApplyMods.sh
Boot animation now smaller, using jpegs instead of png files, no difference in appearance.
​
Version 8:
Download it here.
What's new:
Added full phone backup and full restore phone options to the menu. It will download a backup if there is none found.
root script more universal, tries psneuter first, then gingerbreak.
Early usb recovery updated, now uses a tmpfs for system, also mounts /sdcard and /sdcard-ext.
Deodexed French 2.1.1 files incorporated.
Misc fixes
​
Version 7:
What's new:
New Menu script for windows and linux in the top folder, double click Menu and enter options.
ApplyMods and other scripts updated to use /data/local/tmp/system, this means I can update system.tar.gz and add folders to be copied into system.
Early USB enumeration recovery option. (experimental but useful as is)
Fixed bugs in windows scripts. Can't get user input from bat file while in a parenthesis block apparently.
Bloat backed up to sdcard now
root and unroot scripts updated with more prompts for rebooting phone.
​
Version 6:
What's new:
Support for Telstra 1.4.2.
ApplyMods can create signed update.zips now, Create_update.bat updated. both using basic ready made scripts in main bin folder instead of creating them on the fly, CR LF issues.
Updated root and unroot scripts, more fool proofing, has to be Bell stock firmware (psneuter doesn't work on telstra).
Includes basic boot animation, and mod for Bell apn on telstra firmware. (Have to reset to default under access point names in settings.)
transparent status bar, yellow tinted white for text color, matches front buttons somewhat.
​
Version 5.1:
Features:
Works under Linux and Windows 7
Includes root and no ads scripts
Patch system for applying modifications.
What's new:
New scripts for doing mods, fixes issues with patch 9 images.
Updated root and unroot scripts, more fool proofing.
New RestoreSystemPartition script
Custom apktool for more [hopefully] bug free installations.
How to use:
Extract archive, keeping folder structure intact.
run a command prompt/terminal (There is a link to one in the windows folder)
run root.bat or root.sh from the linux or windows folders, depending on which one you are using.
Turn the phone off after that is done and turn it back on again.
The rest of the scripts shouldn't be run with psneuter affecting the phone.
run ApplyMods.bat (.sh) [OPTIONAL] This applies webtop hack and translucent status bar, translucent notification drop down, etc. Select update system.tar.gz.
run install_bell_deodex.bat or .sh
System image of stock Bell.
Mirror of above​
Cheers!
Very nice! Looks good!
Will try this when I get home
Sent from my Motorola Olympus
So what is the benefit of this? Will I be able to theme my device with some of the themes that are available? Or should I play it safe and wait for a bell. Sbf to leak before I try anything and brick my phone again lol thanks in advance
EDIT: i see that you have included soft_brick.bat is it the same as this one http://forum.xda-developers.com/showthread.php?t=982859 because that one did not work for me thanks again
Sent from my MB860 using XDA Premium App
cool, i'll try this tomorrow when i don't still have a ****load to do and only 5 hours to sleep
nice to see a Bell dev here!
Also I just wanted to say major props for the crazy awesome idea of doing over-the-air download and installation. Really smart and original.
Atrices, just so you know
NFHimself said:
Hi,
(What is the plural of Atrix?)
Click to expand...
Click to collapse
Can I run this on my mac? Sorry relatively new to adb
Sent from my Motorola Olympus
you could run it on a mac, just had to edit the script a bit.
Hi,
So what is the benefit of this? Will I be able to theme my device with some of the themes that are available? Or should I play it safe and wait for a bell. Sbf to leak before I try anything and brick my phone again lol thanks in advance
Click to expand...
Click to collapse
I wouldn't try theming with ATT files, I would take what was done to them and apply them myself to the deodexed files here. There may or may not be differences that are not obvious. I am never really sure if there is any benefit to this stuff, it's fun to do, about it.
EDIT: i see that you have included soft_brick.bat is it the same as this one http://forum.xda-developers.com/showthread.php?t=982859 because that one did not work for me thanks again
Click to expand...
Click to collapse
The soft_brick.bat script is specific to the folders I am using for transferring data to /system/app and /system/framework. It tries to get root via psneuter, mounts system read write, deletes dalvik-cache files, and tries to copy the files already on the phone to the right folders. It could be that just one file caused the phone to crash mid copy and copying it again will fix things. This avoids trying to do a usb data transfer of all the files which you don't have time to do otherwise. I was also thinking that install-recovery.sh would be a good place to do this, (and then clobber it later with the init.d hack) but I couldn't find setprop and I wasn't in need enough to select a file to use as a semaphore.
Can I run this on my mac? Sorry relatively new to adb
Click to expand...
Click to collapse
It would be easier to do it all from a sh script really, and that would likely be more compatible with a Mac.
Also I just wanted to say major props for the crazy awesome idea of doing over-the-air download and installation. Really smart and original.
Click to expand...
Click to collapse
Thanks!
Cheers!
maledyris said:
Atrices, just so you know
Click to expand...
Click to collapse
Thanks, a lot, really, 10 chars..
How do I recover from a softbrick from this? Thanks.
Before anything is done, all the files are extracted to /data/local/tmp/app and /data/local/tmp/framework. If you run into problems put the phone into fastboot/early usb enumeration mode (see here) and run soft_brick.bat (.sh for linux)
Quote:
A soft brick, in this case, is when you make a bad edit to your framework files and the phone won't fully boot and starts flashing a red LED at you.
There is one catch, you only get about 1-2min to do all of this before the phone reboots on its own. If that happens, do SuperOneClick steps again and continue where you left off. Better yet, build a script to do it all for you
Power off your device
Enter Fastboot:
Hold Volume down + power until you see Fastboot at the top left
Use volume down to scroll down to "Early USB Enumeration" (only shows one item at a time, if you pass it, keep going down, up selects)
Press Volume up to select​
This is the message I get when i run the batch file.
This is of course when invoking Early USB Enumeration.
Wait for the count down to finish ...
'TIMEOUT' is not recognized as an internal or external command,
operable program or batch file.
clearing Dalvik cache..
rm failed for /data/dalvik-cache/[email protected]*.dex, No such file or directory
rm failed for /data/dalvik-cache/[email protected]*.dex, No such file or director
y
rm failed for /data/dalvik-cache/[email protected]*.odex, No such file or directory
rm failed for /data/dalvik-cache/[email protected]*.odex, No such file or directo
ry
reinstalling apps
cp: cannot stat '/data/local/tmp/app/*': No such file or directory
reinstalling framework..
cp: cannot stat '/data/local/tmp/framework/*': No such file or directory
done.
The timeout message means you are running a version of windows without timeout, see adeo thread.
The lines for rm just mean there are no files to delete in the Dalvik-cache, which is normal, you should see that the second time around.
The cp lines are saying that there are no files in /data/local/tmp/app (/framework).
So, that's unusual, in order to get soft bricked using my script you would to have copied files from /data/local/tmp to /system, and if you are bricked would be unable to delete the files afterword.
sequence:
cd /system
cp /data/local/tmp/app/* app/
sync
reboot now
**brick**
So, how are the /data/local/tmp/app files being deleted?
No clue. I'm not sure what to do here? Is my phone permanently bricked? Any other way to recover from this? The one thing that could have gone wrong is I tried installing from my behind my works firewall. Maybe I could not download the proper files.
No, you are soft bricked, you only made a change (that I know of) in system files.
Were you rooted before you tried this?
If you copy the soft_brick.bat files and change the last line to be adb.exe shell ls -R /data/local/tmp, what do you get?
Basically, it sounds like to need to get the files copied over to data/local/tmp, how they are missing/inaccessible is odd. So, create a script to copy the files over bit by bit, might take a while but it should be able to be done.
EDIT:
Do this:
from command prompt:
adb.exe shell ./data/local/tmp/psneuter
wait a few seconds
type this:
adb shell ls -l -R /data/local/tmp
if psneuter fails, it isn't in /data/local/tmp, which is also odd.
I was rooted before this. So I should attempt all these commands while Early USB Enumeration right? That doesn't give me much time Lol.
OK, here's the output.
C:\bell_deodex>adb.exe shell ./data/local/tmp/psneuter
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
property service neutered.
killing adbd. (should restart in a second or two)
C:\bell_deodex>adb shell ls -l -R /data/local/tmp
/data/local/tmp:
-rwxr-xr-x root root 585731 2011-01-09 02:02 psneuter
-rw-r--r-- mot_tcmd mot_tcmd 4 2011-03-30 21:00 ap_tcmd.pid
C:\bell_deodex>^A
And sorry to be a pain. How would I create the script? What are the files that need to be copied? Are they included in your script?

Categories

Resources