Galaxy SII I9100 - xterm on the phone - Galaxy S II General

For lots of reasons, I wanted to have xterm on my phone and interact with
it that way. Maybe someone else will find this useful as well. It's simply
a collection of bits from a Linaro alip in a tarball.
Phone prerequisites:
1. Root
2. bash & tar
3. A terminal emulator or adb
4. ES File Explorer to make things easy
PC prerequisites:
1. X-Window server
Steps:
On PC:
1. Start X-Window server. On my PC I use X-Ming
2. Tell X-Ming to allow incoming connections. If you are on a private network,
update it's command line to add -ac, which would allow all connections, btw.
3. Obtain PC's IP address
4. You will probably have to tell your PC firewall to let the X port through.
On phone:
1. Place the tar on the phone
2. Via terminal emulator or adb, su to become root
3. cd /data/local
4. mkdir ub (or whatever you want)
5. cd ub (or whatever you made)
6. move or copy the tar "here" (ub)
7. gunzip and untar the tar
8. With ES File Explorer go to Settings and make /system writeable
9. ln -s /data/local/ub/lib /
10. ln -s /data/local/ub/usr /
11. ES File Explorer and make /system read-only again
12. exit the su to relinquish root
13. Turn phone WiFi on
14. cd /data/local/ub (or whatever you called it)
15. ./x <Your PC's IP Address>
Notes:
1. This is a non-paranoid and bare bones xterm. If you wish a security wrapper, add it,
and otherwise alter it to your needs. It will complain about "locale not supported".
That's just a warning.
2. You will have to do 8 to 11 above after each re-boot. But you can turn that into
"push-button" simplicity with something like GScript from the market.
3. When the phone goes to sleep you may notice a significant lag in character echo.
This is the phone doing it. Wake it up.
Xming command and desktop snapshots show it running.

Related

Connect G1 to Ad-hoc network

Anyone can confirm this?
This guide will help you to connect your G1 to laptop's Ad-hoc wireless network.
Requirements:
1. Rooted G1 phone.
2. Terminal emulator. (You can download it here or from Android market)
3. Busybox for android. (download)
Steps:
1. Install Terminal emulator
I assume that most of you guys already have this since it is essential for root access.
For those who don't have this installed you will have to make sure that you have root access first.
The easyest way to install this application is to download it from Android market, but if you don't have access to internet from your phone, you could install it over ADB or some other way.
2. Install busybox for android
Open Terminal emulator and type following commands:
Become super user:
Code:
Code:
su
Make new directory for busybox and navigate to it:
Code:
Code:
mkdir /data/busybox
cd /data/busybox
Now you should copy your downloaded busybox file to this new directory. You could do this simply by connecting your phone to the computer over usb cable and copy file to the sdcard or you could push it using ADB service directly to our directory. If you wish to do this over ADB you should do the following.
a) ADB is part of Android SDK and you can freely download it for Windows, Linux or even Mac, just google it. Your downloaded busybox file must be in the same folder with adb or you can specify the different path in adb command if you have it somewhere else. To push the file to the phone using ADB you could type the following command on your computer (offcourse you must first navigate to the folder in which is your Android SDK and then to the subfolder tools):
Code:
Code:
adb push busybox /data/busybox/busybox
b) The other way is to copy the file to your sdcard and then move it to our folder with cat command, since we don't have cp command to copy the file. To do this you must type the following commands on your phone assuming we didn't leave Terminal emulator and we are still in /data/busybox/ directory.
Code:
Code:
cat /sdcard/busybox > ./busybox
Now that you have it in your folder you should do the following:
Make busybox binary executable
Code:
Code:
chmod 755 ./busybox
Execute following command to install busybox:
Code:
Code:
./busybox --install
Make all the installed tools in folder executable like you did with the first one:
Code:
Code:
chmod 755 *
Last step is to export it to PATH to make it usable at all time.
Code:
Code:
export PATH=/data/busybox:$PATH
3. Now you can modify two important files to make your phone able to connect to Ad-hoc
First gain root access with su command like before:
Code:
Code:
su
Remount /system partition as read-write with the following command:
Code:
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Navigate to /system/etc/wifi/
Code:
Code:
cd /system/etc/wifi
Now you must edit tiwlan.ini file in current directory. I did this with VI editor which is part of busybox. You must know some basic things about VI editor befor you do this. VI operates in two modes. When you open editor you are in command mode and you can't edit your file yet.
To edit file type:
Code:
Code:
vi tiwlan.ini
First you must navigate trough file with your trackball. Find the following line:
Code:
Code:
WiFiAdhoc = 0
This is the line we need to edit. To enter edit mode press A on your phone's keyboard. Now move the cursor with trackball to the end off this line. Replace 0 with 1. You must add two more lines in order this to work. To add new line press enter key and then type:
Code:
Code:
dot11DesiredSSID = HTCG1
dot11DesiredBSSType = 0
Replace HTCG1 with whatever you like. This is SSID of your wireless Ad-hoc network.
Now you must exit back again to command mode. This is done with escape key, and since our keyboard doesn't have escape key we must click down trackball and simultaniously press 1. This is the same as you pressed escape on regular computer keyboard. In command mode again we can't edit the file but we can type commands. Command for saving file is 'w' and for exiting editor is 'q'. Every command is typed after ':' so our command to save file and exit editor will be:
Code:
Code:
:wq
The next file we need to edit is /data/misc/wifi/wpa_supplicant.conf
Edit it the same way as previous file and add these lines:
Code:
Code:
network={
ssid="HTCG1"
key_mgmt=NONE
mode=1
}
Save and exit
'mode = 1' indicate that this is Ad-hoc network
4. Make Ad-hoc network on your laptop or computer.
I assume you know how to do that and I won't explain it because you can google it. Only thing to know when you do this is that you have to set SSID for the network same as the SSID in two files you edited and that you must make open network without wep or other security. Yet if you decide to have protected network you must also edit wpa_supplicant.conf file and modify it. Again google it if you want to know more.
5. Finally connect
If you configured correctly your computer wireless network and selected it to connect, you should then disable and enable wireless in your mobile phone settings. If SSID is broadcasted you should see your network and signal strenght in network list. Connect.
that may work. theres an app for that though (not trying to sound iphonish )
aNetShare. easy to use.
aNetSHARE mega upload link
I think aNetShare is for sharing your G1s data network to your computer. This guide is for doing the opposite. Basically useful if you have a wired only internet connection but want to use your laptops wireless card to share the wired connection with the G1. That being said, I tried to do this and my G1 is unable to connect to the ad hoc network.
Holy crap iv been waiting for this for a long time.
Hopefully some guys are able to put a gui around this to make it user friendly
Hey, can anyone tell me how should I change the last file, like this (how to make those spaces?):
network={
ssid="HTCG1"
key_mgmt=NONE
mode=1
}
like this:
network={
ssid="HTCG1"
key_mgmt=NONE
mode=1
}
like this:
network={
ssid="HTCG1"
key_mgmt=NONE
mode=1
}
or maybe like this:
network={ssid="HTCG1"
key_mgmt=NONE
mode=1}
Any ideas? I tried different combinations, nothing happens. Maybe I am setting ad-hoc wrong in the computer. Can anyone give me a simple solution? I'm without net in G1 for a couple of days, so I need to share my laptop net connetcion with G1.
No matter what your changes, all of they are right. If you are on right way, you can see there is a network named "HTCG1" in available wireless networks, in Wireless Settings. I was successful with this tutorial. Let's make the changes, step-by-step.

[How To] Enable Non-Market apps on Captivate (consolidated)

(additional CHOWN notes added below. If you are getting "chown: unknown user/group system:system" read them!
Ok, we do have a WHOLE other thread that was made a sticky already, but you need to read the WHOLE thing to get all the properly interesting parts. I'll make sure I keep this OP up to date.
The following methods enable side loading and installing of apps onto the captivate, without the need of a program on a computer attached via the SDK. There are multiple methods, and for the most part, these methods that have worked flawlessly for many users here on this forum. We're just collecting them all in one post for speed and clarity.
Methods that assist in loading applications, without modification to the settings (a.k.a still need a computer attached) can be found at the collective wiki, http://samsungcaptivate.wikia.com/wiki/How_to_Sideload
ALL METHODS REQUIRE ROOT & BUSYBOX:
Root your phone, see http://forum.xda-developers.com/showthread.php?t=725555
Busybox : http://www.appbrain.com/app/stericson.busybox
Please, save a clean, un-altered backup copy of this file. To be safe. Rarely does corruption occur, but if it does, it won't be good.
Method 1: From Win7x64, Samsung Drivers, Android SDK installed.
This method uses the tools you already have at hand, as part of the SDK. All instances in code blocks are run inside of the command prompt. You will need to know where you installed your SDK, and the tools directory therein.
Once rooted, go install BusyBox installer from the App Market/AppBrain etc and run it. It will download and install the latest version for you.
From my Win7x64, with USB Debugging ON. Ensure that you phone is UNLOCKED as it the SU app will ask for permission for 'UNKOWN' in the following command.
Connect to PC, and Eject/Safely Remove the SD card, and "Turn off USB Storage" on the phone.
open command prompt, follow along:
Code:
> c:
> cd \android\tools
> adb shell
$ su
# cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db
# exit
$ exit
mount the SD cards to the pc,
"USB Connected select to... ", Mount
mine mounted as H:
Code:
> copy H:\settings.db settings.db
> sqlite3 settings.db
~> update secure set value="1" where name="install_non_market_apps";
1 row updated
~> .quit
> copy settings.db H:\settings.db
Eject the drive, safely remove, etc.
"Turn off USB storage" etc, to mount it back to the phone
Code:
> adb shell
$ su
# cp /sdcard/settings.db /dbdata/databases/com.android.providers.settings/settings.db
# chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
# chown system.system /dbdata/databases/com.android.providers.settings/settings.db
# exit
$ exit
> adb reboot
Bam. Done.
Method 2: with Root Explorer
(courtesy of kirbo20)
This is a pretty easy process. I went in to Root Explorer - dbdata - databases - com.android.providers.settings, copied settings.db to my sd card, edited it on my pc with a db editor changed 0 to a 1 next to non market apps. Copied it back to the original directory, rebooted and installed a non market app.
(added by gotfolk)
again using FF plug in..
Click Secure on the left pane
click on install_non_market_apps
click edit
number 3 states value click there and type in 1. hit ok
(/gotfolk)
Please use caution. If you want to make sure the db save properly open it on your sd card before you copy and replace the original. It should open up as a readable table. If it opens up in a txt editor its corrupt. This permanently enables non market apps. You can not toggle it on and off.
( This is a sqlite3 database file, you can find many GUI editors that will be able to handle the editing, including a FF plugin. Search "SQLite" )
Method 3: with Root Explorer & Sqlite Editor & Terminal Emulator
(courtesy of ice3186)
- Open Root Explorer
- Browse to /dbdata/databases/com.android.providers.settings/
- copy settings.db to the root of your sd card ( /sdcard/ )
- Click on the newly copied settings.db in /sdcard/, with SQLite Editor installed, you can open and edit it here.
- Select the "secure" table, and update the value of 'install_nonmarket_apps' from 0 to 1, and save.
- close out of SQLite editor
- copy the modified file ( /sdcard/settings.db ), and browse back to /dbdata/databases/com.android.providers.settings/ and paste
- confirm the overwrite if asked and then open again to confirm it's been changed.
- open Terminal Emulator
Code:
$ su
# chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
# chown system.system /dbdata/databases/com.android.providers.settings/settings.db
# reboot
- reboot phone.
No PC, no Mac, no drivers, no SDK. Viola.
Method 4: Mac & Android SDK
You will see "[sdcard]" through this method...I don't own a Mac so I'm guessing a bit.
This method uses the tools you already have at hand, as part of the SDK. All instances in code blocks are run inside of the Terminal. You will need to know where you installed your SDK, and the tools directory therein.
Once rooted, go install BusyBox installer from the App Market/AppDroid etc and run it. It will download and install the latest version for you.
From a Max OS X, with USB Debugging ON. Ensure that you phone is UNLOCKED as it the SU app will ask for permission for 'UNKOWN' in the following command.
Connect to Mac, and Eject/Safely Remove the SD card, and "Turn off USB Storage" on the phone.
open Terminal, follow along:
Code:
> cd /android/tools
> ./adb shell
$ su
# cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db
# exit
$ exit
mount the SD cards to the Mac,
"USB Connected select to... ", Mount
mine mounted as [sdcard]
Code:
> cp [sdcard]/settings.db settings.db
> ./sqlite3 settings.db
~> update secure set value="1" where name="install_non_market_apps";
1 row updated
~> .quit
> cp settings.db [sdcard]/settings.db
Eject the drive, safely remove, etc.
"Turn off USB storage" etc, to mount it back to the phone
Code:
> ./adb shell
$ su
# cp /sdcard/settings.db /dbdata/databases/com.android.providers.settings/settings.db
# chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
# chown system.system /dbdata/databases/com.android.providers.settings/settings.db
# exit
$ exit
> ./adb reboot
Method 5: Android SDK only
Of course, this also requires root and BusyBox.
From the android sdk tools folder in a command prompt:
note: all linux/mac should use './adb' in place of just 'adb', and place quotes on the echo statement between echo and |
Code:
adb shell
su
chmod 666 /dbdata/databases/com.android.providers.settings/settings.db
exit
exit
adb pull /dbdata/databases/com.android.providers.settings/settings.db settings.db
echo update secure set value = 1 where name = 'install_non_market_apps';|sqlite3 settings.db
adb push settings.db /dbdata/databases/com.android.providers.settings/settings.db
adb shell
su
chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
chown system.system /dbdata/databases/com.android.providers.settings/settings.db
reboot
NOTICE
You must chown the settings.db file and reboot once it is back in its original location. If you do not, you will not be able to alter settings such as WiFi,GPS, default Ringtones, etc. It's also highly likely that you may wish to chmod to 660 (-rw-rw---), so I've tacked that in here and above.
Code:
> adb shell
$ su
# chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
# chown system.system /dbdata/databases/com.android.providers.settings/settings.db
# exit
$ exit
> adb reboot
Chown Note
In the event that you are getting "chown: unknown user/group system:system" please try 1000.1000 as this has been reported to work on several of the samfirmware-released roms that fail with this message.
Absolutely do not use someone else's settings.db unless you specifially make it a point replace android_id with your android_id!
Special Note
Any of these adb comments can be run from Terminal Emulator (Android Terminal Emulator, free) from the su command. I use the ADB here as it is a lot easier to type into. Terminal Emulator will provide you with a shell that is an exact match of the 'adb shell' command, as they both simply provide the shell to you.
Result:
After completing this process you will be able to load non-market apps directly from the APK files, SDK tools, tools such as DroidExplorer and apps such as APKtor.
You will be able to download the APKs directly, and then install from your favorite file browser (e.g. MyFiles(s), Astro(f), RootExplorer($)...)
Tools
SQLite Administrator (Win, GUI, no FF required) http://sqliteadmin.orbmu2k.de/
SQLite Manager (FF addon, search for it)
Application links
Root Explorer http://www.appbrain.com/app/com.speedsoftware.rootexplorer
SQLite Editor http://www.appbrain.com/app/com.speedsoftware.sqleditor
Terminal Emulator http://www.appbrain.com/app/jackpal.androidterm
BusyBox http://www.appbrain.com/app/stericson.busybox
bump.. settings.db people.. please read the threads!!
good stuff!!!
Ok. I can find settings.db with root explorer. i can copy it and i put it in my sdcard folder but nothing is there when i try to find it on my computer. Im trying to use SQlite editor on firefox. Im also on a powermac g4 if that makes a difference. I did download sqlite editor on my phone and I can find where to change the values for installing non market apps but when I change from a zero to a one it denies me. Please help
Ok, so let me make sure I have your process:
- Rooted
- Installed busybox ?
- Installed Root Explorer
- copied settings.db to /sdcard
-- cant see the file when mounted to Mac, thus can't edit with FF plugin
-- SQLite editor for android wont allow access..
(is this the SQLite Editor you used? http://www.appbrain.com/app/com.speedsoftware.sqleditor)
Try installing "Android Terminal Emulator" from the market (http://www.appbrain.com/app/jackpal.androidterm)
- open Terminal Emulator
$ su
# cd /sdcard
# chmod 777 settings.db
# exit
- Open the sqlite editor, and make the change
- back to Terminal Emulator
$ su
# chmod 660 settings.db
- proceed with rest of instructions.
how many more threads do we need on the same thing? We already have ALL of this info posted, several times.
designgears said:
how many more threads do we need on the same thing? We already have ALL of this info posted, several times.
Click to expand...
Click to collapse
Please read my initial post, first few lines. I explained why, specifically: Consolidation.
Thanks I will give it a try later today.
Sent from my SAMSUNG-SGH-I897 using XDA App
- OP updated to reflect stock ownership settings for 'chown'
Also, which sqlite app are you using? I'll put that up as method 3 if it works out nicely for you.
fixed a typo in the chown command.. bad copy paste.. bad.. doh.
added method 3 courtest of ice3186
added links to Root Explorer ($), SQLite Editor ($) and Android Terminal Emulator (free) and added the chmod/chown commands to method 3, as they were skipped by accident.
bump** for newcomers, sry.
thanks max for adding the third method. this was by far much easier than the first two methods. I have a hard time getting my mac to talk to my phone sometimes and it was good to not have to plug the lil guy in at all. Worked like a charm
myself and ice3186 are glad we could be of help
If I had accidentally deleted the settings.db how should I go about recovering my phone? Now I have the issue that my phone won't boot past the boot animation and I'm notbsure what to do
mkslt4 said:
If I had accidentally deleted the settings.db how should I go about recovering my phone? Now I have the issue that my phone won't boot past the boot animation and I'm notbsure what to do
Click to expand...
Click to collapse
Did you make any kind of backup before hand?
You may have to use someone else's settings.db and then do a factory reset.
Depending on how much you've done with the phone I'd suggest deciding on doing a the reboot process for rooting, but choosing to clear data. This may rebuild it, I am not sure.
my dbdata directory is empty.. My phone is less then 2 hours old and i have some market apps installed..
xetrev said:
my dbdata directory is empty.. My phone is less then 2 hours old and i have some market apps installed..
Click to expand...
Click to collapse
Oh, if it's running, then this folder isn't actually empty.
What are you using to browse this folder?
i followed this guide to a T yesterday when i did this. I used option 1, ADB commands on terminal since i'm a mac and it was super easy, did it in about 5 minutes.
this is just my opinion but i think everyone should try playing with the ADB commands, they're actually really useful and educational to know. and if you should brick your phone, just use clockwork recovery to restore it.
that being said, maybe you should add a disclaimer that when done on a mac, the adb commands require a "./" in front (so adb reboot becomes ./adb reboot). cp, chown, and chmod commands don't need it though (or at least i didn't).

How to prevent update/block update

I've been reading a couple of threads on preventing OTA updates and can't seem to figure it out. I'm more interested in the sqlite & ADB method from this thread (http://forum.xda-developers.com/showthread.php?t=933291). I read this thread about 10 times over and over but can't seem to get it to work. Can someone that's knowledgeable please put instructions that an idiot like me can follow?
I have a rooted NC with firmware 1.2.
1. I've downloaded sqlite3 and nookcolor-easyADB to my PC.
2. I've extracted nookcolor-easyADB and install the install.vbs file.
3. Connected my NC to my PC via USB cable
4. My PC recognizes my NC and the microSD card as a different drive.
i followed the following steps from the thread and nothing works:
***************************************************************
Attached is a working sqlite3 binary.
Copy it to /system/bin
(I transfered it to my SD, then used rootexplorer (mount R/W) to copy into /system/bin))
you will now be able to edit sqlite databases on the nook itself.
--------------------------------------------------------------------------------
Attached Files sqlite3.7z (11.9 KB, 56 views)
--------------------------------------------------------------------------------
In your terminal:
$ adb pull /data/data/com.bn.devicemanager/databases/devicemanager.db devicemanager.db
$ sqlite3 devicemanager.db
sqlite> update registry set value='manual' where name='com.bn.device.fota.mode';
sqlite> .q
$ adb push devicemanager.db /data/data/com.bn.devicemanager/databases/devicemanager.db
$ adb reboot
Congrats Your NC is now permanently blocked from any future BN OTA auto updates.
No more build.prop spoof hacks for each release (sideload only),,,,,, yada yada
***************************************************************
Questions:
should I create a directory in my PC (C:/windows/system/bin) and copy sqlite3 to the /bin folder or copy sqlite3 to my microSD card and insert it into my NC?
Please be very elementary in your answers (as you were explaining it to your 6 year old). Thanks in advance.
There is a free version of SQLite with graphic user interface that allows you to change the fota field from "auto" to "manual". Do a search of title only for "block" and you should find it.
crazyasian2 said:
I've been reading a couple of threads on preventing OTA updates and can't seem to figure it out. I'm more interested in the sqlite & ADB method from this thread (http://forum.xda-developers.com/showthread.php?t=933291). I read this thread about 10 times over and over but can't seem to get it to work. Can someone that's knowledgeable please put instructions that an idiot like me can follow?
I have a rooted NC with firmware 1.2.
1. I've downloaded sqlite3 and nookcolor-easyADB to my PC.
2. I've extracted nookcolor-easyADB and install the install.vbs file.
3. Connected my NC to my PC via USB cable
4. My PC recognizes my NC and the microSD card as a different drive.
i followed the following steps from the thread and nothing works:
***************************************************************
Attached is a working sqlite3 binary.
Copy it to /system/bin
(I transfered it to my SD, then used rootexplorer (mount R/W) to copy into /system/bin))
you will now be able to edit sqlite databases on the nook itself.
--------------------------------------------------------------------------------
Attached Files sqlite3.7z (11.9 KB, 56 views)
--------------------------------------------------------------------------------
In your terminal:
$ adb pull /data/data/com.bn.devicemanager/databases/devicemanager.db devicemanager.db
$ sqlite3 devicemanager.db
sqlite> update registry set value='manual' where name='com.bn.device.fota.mode';
sqlite> .q
$ adb push devicemanager.db /data/data/com.bn.devicemanager/databases/devicemanager.db
$ adb reboot
Congrats Your NC is now permanently blocked from any future BN OTA auto updates.
No more build.prop spoof hacks for each release (sideload only),,,,,, yada yada
***************************************************************
Questions:
should I create a directory in my PC (C:/windows/system/bin) and copy sqlite3 to the /bin folder or copy sqlite3 to my microSD card and insert it into my NC?
Please be very elementary in your answers (as you were explaining it to your 6 year old). Thanks in advance.
Click to expand...
Click to collapse
1. Go here and get the sqllite browser and throw it in a directory on your pc.
2. Use adb and pull the database file from your nook to your pc (like the instructions you quoted).
3. Use the sqllite browser and make the changes and save them.
4. Use adb and push the file back to your nook.
5. Reboot your nook
6. Enjoy being free from updates.
Here's the idiot's guide that worked for me:
1. Go download the following 2 files:
nookcolor-easyADB.zip
sqlitebrowser_200_b1_win.zip
2. Extract “nookcolor-easyADB.zip
this will create a file “.android” in the following directory C:/Users/your_user_account
extract “sqlitebrowser_200_b1_win.zip” anywhere
3. Connect your NC to your PC via USB port.
4. Open the command prompt (it’s in your program, accessories directory)
You should have a prompt that looks like this – C:\Users\your_user_name>
5. Type the following command:
adb pull /data/data/com.bn.devicemanager/databases/devicemanager.db devicemanager.db
This command will go grab the file “devicemanager.db” from your NC and place it in the following location: C:/Users/your_user_account on your PC.
6. Now go to the directory where you extracted “sqlitebrowser_200_b1_win.zip” and double click on the file “SQLite Database Browser 2.0 b1.exe”. This will run the browser that will allow you to open the file “devicemanager.db” and edit it.
7. In the browser click file/open database. It should automatically take you to where the file “devicemanager.db” is located. Select that file.
8. Click on the “Browse Data” tab.
9. Click on the “Table:” pull down menu and click on “registry’.
10. If you look at line 7, all the way to the right is the “value” column it should say “auto”.
11. Double click on “auto” and another window will pop up.
12. Change the word “auto” to “manual”.
13. Click on “Apply changes” and close the window.
14. Click on “save” button on the top left and close the browser.
15. Go back to the command prompt and type the following:
adb push devicemanager.db /data/data/com.bn.devicemanager/databases/devicemanager.db
This command will push the file “devicemanager.db” from your PC back to your NC with the updated file.
16. Type the following command to reboot your NC:
adb reboot
DONE!
I would think the simplest method, using materials you should be halfway familiar with from rooting, is to install ClockworkMod Recovery to your NC. I know it will stop the update from installing, but I'm not sure if the update would quit trying to install.
The simplest ways to get CWM on your NC are:
1) get the ROM Manager app and "Flash ClockworkMod Recovery"
2) if you have a CM7 sdcard, it probably already has ROM Manager, and flashing from there will also install CWM to your internal recovery.
Taosaur said:
I would think the simplest method, using materials you should be halfway familiar with from rooting, is to install ClockworkMod Recovery to your NC. I know it will stop the update from installing, but I'm not sure if the update would quit trying to install.
The simplest ways to get CWM on your NC are:
1) get the ROM Manager app and "Flash ClockworkMod Recovery"
2) if you have a CM7 sdcard, it probably already has ROM Manager, and flashing from there will also install CWM to your internal recovery.
Click to expand...
Click to collapse
This is my thinking as well. B&N tried pushing the update to me and a coworker yesterday. CWR blocked it as expected. Rebooted and all is well. As you mentioned, time will tell if B&N will continue to try to push v1.3 to me. If it becomes obnoxious, I may go this route.

[GUIDE] Customizing ROMs for your needs.

At the request of others, I have decided to write this guide pertaining to ROM customization. I found that in most of the current custom Jelly Bean ROMs for the TF101, that the GPS configuration has been changed, at least compared to the stock Asus ICS ROMs for the TF101 and the stock Asus Jelly Bean ROM for the TF300T, and they are using modified user / group and permissions settings. They all say that it is because those items have changed in Jelly Bean. They are also using a custom /etc/gps.conf file. The problem is that I, along with several others, aren't seeing very good GPS response and some claim not to see any. The ones that do see something, see that the first initialization takes forever and then is likely to not hold a fix, only seeing a few satellites. I made some changes in the ramdisk and /etc/gps.conf file and tested with a few of the Jelly Bean ROMs for the TF101 and found that settings matching the stock Asus settings performed quite well and was asked to share the process that I used. While it would be easier probably to just post the modded kernels for others to reflash, I'll give it a go at explaining what I've done.
1) This guide will require either a working native Linux install or can probably be used with a virtual machine Linux install. I'm using Ubuntu 12.04-x86_64 LTS as Ubuntu is usually used in most of the guides I've found. You may be able to make things work with other Linux flavors, but YMMV. I'm going to assume, at least, a basic knowledge of Linux file systems and the ability to copy and paste to a terminal and follow instructions.
2) You may need to install the Android SDK and at least one platform in order to get a working "adb" command, which will be needed. You may be able to get the "adb" binary from other sources that will work and "adb" will require some setup in udev rules to allow your normal user to access the tab with it. I'm going to assume that you have all of these things in place and working and that "adb" is in your path. If not, then Google is your friend.
3) For good measure, it would help and definitely won't hurt anything to have some build environment files in place. In a terminal, copy and paste the following:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
Let that install and when it is finished, copy and paste the following:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
4) Now we need to grab dsixda's Android Kitchen, which is where some of the magic can happen. Go here to read up on how to use it and to find the download link. While the TF101 isn't specifically supported, there are a lot of things that we can still use it for. Just don't try to build a ROM and flash it with this before you have read dsixda's thread thoroughly or you may wind up with a brick. I'm only going to describe things that I've done and tested and that I know will work. For ease of this guide, I'm going to assume that you read the instructions there and that you unzip the downloaded file to "/home/'yourname'/android/kitchen/".
http://forum.xda-developers.com/showthread.php?t=633246
5) Now we need to build the blob tools used to pack and unpack the .blob files. Here we will download the source code for these tools and build them on the local machine. Go here:
https://github.com/AndroidRoot/BlobTools
6) Download the .zip file and extract to "/home/'yourname'/blob_tools/", where 'yourname' is your home directory name. Then, in a terminal, type "cd ~/blob_tools", without the quotes. Then type "make". When this is finished, type "mkdir ~/bin", if it doesn't already exist, and then type "cp ./blobpack ~/bin/;cp ./blobunpack ~/bin/". Now we need to make sure that "~/bin/" is in our PATH. Type "cat ~/.profile" and make sure that there are lines matching the below there:
Code:
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
If not, use an editor like gedit, to add them just before the last line which should say "fi". For basic instructions on the blob tools, see here:
http://forum.xda-developers.com/showthread.php?t=1068548
That should be all for the tools and setup. Now reboot your PC to Linux, for good measure.
I'm going to use as an example, the changes I made for the GPS permissions and settings. Anything else will be up to your own personal study and research and experimentation. I assume no responsibility if you do something mentioned here or not or if you should brick your device.
1) Download the CWM flashable custom ROM of your choice. I'm not going to deal with Asus stock ROMs here because there are extra steps to do to look into those completely. Extract the ROM to a directory under your home directory. You will have to create it, such as "Team_EOS3" or whatever. I'm going to use the graphical file manager Nautilus and the graphical text editor gedit to work with files and directories and to edit files. When using Nautilus be sure to go to the "View" menu and select "Show hidden files". Some work will also be done in a terminal. I use Gnome terminal.
2) For example, I have a folder "K900_AOKP_JB", where I extracted K900's ROM. So if I look at that in Nautilus, I see 2 folders, "META-INF' and "system" and 2 files, "boot.blob" and "boot.img". Most of the custom roms will not have the boot.img file, only the *.blob file. The blob file and the boot.img file should be the same thing. Each contains the compressed kernel image and the initial ramdisk.
3) From a terminal, type, for example, "cd ~/K900_AOKP_JB". Then type, "blobunpack ./boot.blob", substituting the appropriate names for your particular files. In Nautilus, you will see that 1 more file was created, in my case, "boot.blob.LNX". Right click and copy this file to your Kitchen WORKING_DIRECTORY which you should have created from following the kitchen instructions. For me it is "~/android/kitchen /WORKING_091312_142859/", where "~" is shorthand for "/home/'yourname'", i.e. your personal home directory. Right click and delete or move to trash the boot.img file that is there already. Right click the file you just copied, i.e. "boot.blob.LNX" and rename it to "boot.img". Upper and lower case matters, so pay attention.
4) From a terminal, type "cd ~/android/kitchen". Then type "./menu". Choose option "0", then choose option "20", then choose option "w". Follow any instructions that come up. These actions will create a new directory, "~/android/kitchen/BOOT-EXTRACTED/", which is where the kitchen just extracted your renamed blob file (boot.img). Inside, you will see a "boot.img-ramdisk" folder, which contains the ramdisk files and a "zImage" file, which is the compressed kernel.
5) Inside the ramdisk folder, we are going to edit only the "init.ventana.rc" file to change some GPS settings. Open the file with gedit and scroll down to the #GPS section. Change it to read the following:
Code:
# GPS
mkdir /data/gps
chown system system /data/gps
chmod 770 /data/gps
chown root system /dev/ttyHS1
chmod 0664 /dev/ttyHS1
Scroll down to the #GPS init section and change it to read the following:
Code:
# GPS init
write /sys/class/gpio/export 203
write /sys/class/gpio/gpio203/value 0
write /sys/class/gpio/gpio203/direction out
chown root system /sys/class/gpio/gpio203/value
chmod 0664 /sys/class/gpio/gpio203/value
Scroll down to the # Start GPS daemon section and change it to read the following:
Code:
# Start GPS daemon
on boot
service gps-daemon /system/bin/glgps -c /system/etc/gps/gpsconfig.xml
user root
group root
class late_start
Save the file. Right click and delete "init.ventana.rc~", which will only show up if you selected to "Show hidden files" in the "View" menu. In Nautilus move back to your kitchen WORKING directory.
6) In the terminal that should still be running the kitchen menu, choose option "b" to rebuild the boot.img. You can now exit out of the kitchen menu. Back in Nautilus, right click and rename the "boot.img" file to "boot.blob.LNX" or whatever your original extracted blob file was called. Right click and copy to the folder where your ROM was extracted. Choose to replace the original file if asked.
7) In a terminal, type "cd ~/K900_AOKP_JB", substituting "K900_AOKP_JB" with whatever your extracted ROM folder is called. Then type "blobpack ./boot.blob LNX ./boot.blob.LNX", substituting your file names for "boot.blob" and "boot.blob.LNX".
8) In Nautilus, in the folder where your ROM was extracted, double click the "system" folder, then double click the "etc" folder. Then double click the "gps.conf" file. It should open up in gedit, if you were using that before, if not then choose to display it. Change it's contents to read the following:
Code:
#
# IMPORTANT:
# this file is only used by NetworkTimeUpdateService.java
# DO NOT make any GPS related settings here.
#
NTP_SERVER=xtra1.gpsonextra.net
Save and close the "gps.conf" file.
9) In Nautilus, in the folder where your ROM was extracted, left click on the "META-INF", "system" folders and the *.blob and boot.img file, if present, while holding down CTRL key, to highlight all 3 or 4 items. Right click on 1 of the highlighted items and choose "Compress". Rename the file if desired, especially if you have the original zip in that folder by the same name and want to preserve it, and then click "Create". The new zip file, with your custom name, will be created in the same folder after a few seconds. In my case, I chose to name it "K900_AOKP_JB-test.zip".
10) You now have created your own customized version of someone else's ROM, modified for your needs or experimentation. Now it's time to push it to your device. You can use Dropbox, if desired to do this, but the easier way is to use adb. I'm going to assume that you have a working Custom Recovery, preferably one that can read both internal sdcard and external MicroSD and that you have adb setup and working.
11) Plug your charging cable into the computer first and then plug the other end into the TF101.
12) In a terminal, type "cd ~/K900_AOKP_JB", substituting "K900_AOKP_JB" with the folder name where you extracted your ROM and where the new zip file resides. Type "adb devices" and after a second or two, you should see something similar to the following:
Code:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
03806245421f9417 device
If you get something looking like that, then adb is working.
13) In the same terminal, type "ls", which will list all the files and folders in your extracted ROM directory (or whatever your current directory is). If your recovery can read only the internal sdcard or both, then you can type "adb push ./K900_AOKP_JB-test.zip /sdcard/Download/", substituting "K900_AOKP_JB-test.zip" with whatever you named your zip file. After a few minutes you should get a confirmation that the transfer completed and can verify that it did with a file manager on the device.
14) If your recovery only reads from the external MicroSD card, then type "adb shell", then type "ls". You will get a list of all files and folders in the root directory of your device's file system. If you are running ICS or older, then you should see a "Removable" directory. If you are running one of the custom JB ROMs, then you may not have the "Removable" folder, but most likely a "storage" folder. For ICS or older, your external MicroSD should be located at "/Removable/MicroSD/". In the latter case, it should be located at "/storage/sdcard1/". In any case, once you have verified where the external card is mounted, then type "exit". Now type either "adb push ./K900_AOKP_JB-test.zip /Removable/MicroSD/" or "adb push ./K900_AOKP_JB-test.zip /storage/sdcard1/", depending on your results from adb shell. After a few minutes you should get a confirmation that the transfer completed and your new zip should now be on the root directory of your external MicroSD card.
15) Now you should be able to reboot to your recovery and flash the zip you created just like you would flash any ROM. Reboot and enjoy, from this example, working as intended GPS.

[tutorial](under construction)rooting/flashing/recovery on linux[tutorial]

PLEASE SUGGEST IMPROVEMENTS TO INCREASE READABILITY AND CLARITY TO THIS TUTORIAL
Hi guys how are we all doing? This is my first guide so don't bite. I was seriously impressed with the level of support for Linux, I was able to completely sort my phone out in a few hours using Linux. Just a few things before we start this tutorial:
1.) This is a guide for rooting your phone, flashing a recovery and flashing EXISTENZ ROM. All in Linux. It does not include unlocking your bootloader although I'm sure you could achieve this very easily
2.) This is involve using the terminal to install FlashTool, DoomLords Root, and flashing recovery.
3.) If you can use Terminal and are familiar with file structures you're in a very good place.
4.) I use Linux Mint with the Cinnamon desktop. It is a Ubuntu variant. You should be able to do 99% with the commands I give you... otherwise you might have to tweak it very slightly.
STEP ONE: INSTALL FLASHTOOL
To install FlashTool we will do the following:
We will download FlashTool
We will move the files to a more sensible directory (where all the other programs are)
We will create a menu shortcut that requests root access.
We will install libusb via synaptic package manager which FlashTool requires.
Step 1.) Ok, so, download FlashTool from here: http://www.flashtool.net/download.php
Step 2.) Choose the Linux download and just place it on your desktop for simplicity. Have a clean Desktop for simplicity (i.e.) Have only the folders you need for this tutorial.
Step 3.) Unzip the folder and you should get another folder called "FlashTool" on your desktop. Delete the zip file
Step 4.) It might be worthwhile just checking if FlashTool works. So fire up the good old Terminal and type in:
Step 4.1)
Code:
cd Desktop/FlashTool
This puts us in the FlashTool folder in Terminal. Here's a hint, you don't need to fill out every letter in the commands. If you type in "cd Des" and then hit [TAB] then terminal will fill out the rest of the name for you ("Desktop"). Similarly if you type in "cd Desktop/Flas" and then hit [TAB] then terminal will fill out the rest of the name for you ("FlashTool").
Step 4.2) You can check the contents of a directory if you type in
Code:
ls -l
.
This will list every file and folder in the directory you are currently in. So it should produce a list that includes FlashTool, FlashToolConsole, firmwares etc etc. If it doesn't you are in the wrong directory. In addition to listing the files and folders it should give extra information. Look for the line that has "FlashTool" on it. On the left hand side of that line it should have something similar to -rw-r--r--. These are the permissions. We need to change this so do this:
Step 4.3) Type into the terminal
Code:
chmod ugo+x FlashTool
This will change the permissions of the file. "chmod" means "change mode", "u" means user, "g" means "group" and "o" means other. "+x" means add executable file permissions to this file.
Step 4.4) Type in
Code:
ls -l
once again. You should see that now the permissions for the file "FlashTool" has changed. Now we need to run flash tool:
Step 4.5) Type this into terminal:
Code:
su
**ENTER YOUR OWN PASSWORD**
./FlashTool
You should see the FlashTool GUI up and running.
At this point it would be a good idea to put the things you need to Flash via FlashTool in the "firmwares" folder.
So download these:
C6603_10.3.1.A.2.67_Generic UK.ftf from here: http://forum.xda-developers.com/xperia-z/general/stock-rom-xperia-z-c6603-10-3-1-2-67-t2512422
XperiaZ_C660X_KernelOnly_10.3.A.0.423_Generic_NL.ftf from here: https://docs.google.com/file/d/0B5TbYyrM0V0POTE3bk9RS29pV1E/edit
XperiaZ_C660X_KernelOnly_10.3.1.A.2.67.ftf from here: http://d-h.st/LVH
C6603_10.4.1.B.0.101_Stripped.ftf from here: http://nut.xperia-files.com/
Put them in the "firmwares" folder within "FlashTool"
Make sure they all end in .ftf, if they do not you probably need to unzip them
Ok so we should have everything we need for FlashTool. Now we need to move it into a more sensible folder.
Step 5.) Close the terminal down by typing in "exit" twice. Open up a new terminal. Move to the directory Desktop by typing into the terminal:
Code:
cd Desktop/
Now we need to move the folder to a part of the file system that needs root permissions:
Code:
su
**YOUR PASSWORD**
mv FlashTool /usr/lib/
This will mv (MOVE) the FlashTool folder into the /usr/lib/ directory.
If you want to check if it moved just open up your explorer and navigate to /usr/lib/ and you can see that the FlashTool folder will be there.
Now we should create a start menu icon.
Step 6.) I have the Cinnamon desktop. These steps should be ROUGHLY similar. Be creative. Try different things.
For Cinnamon to create a start menu icon I need to "RIGHT-CLICK" on the Start Menu, then go to "CONFIGURE" and then "OPEN THE MENU EDITOR" and then click "PROGRAMMING" in the LEFT COLUMN. After this click "NEW ITEM"
In "Name:" type in "FlashTool" (It doesn't actually matter what you put it)
In "Command:" type in "/usr/bin/gksudo /usr/lib/FlashTool/FlashTool"
Make sure it works. Close the menu editor and launch FlashTool from the menu to see if the GUI boots up.
I'm guessing many people don't have Linux Mint, you'll need to adapt your approach if you want a start menu entry (if you're using a different desktop environment).
Step 7.) Open up Synaptic Package Manager from your Start Menu and type into "Quick Filter": "libusb-1.0" and ensure there's a green box beside "libusb-1.0-0:i386" and "libusb-1.0-0". If they aren't just click the little box next to them, click on "Mark for installation" and hit "Apply" and away you go!
You now have FlashTool installed. Congratulations.
Now we need to flash "C6603_10.3.1.A.2.67_Generic UK" ROM so we can then root it and install a recovery.
Step 8.) Fire up FlashTool. Enter your password. If it doesn't ask for password, the program will boot but flashing will fail
Press the lightning icon. Choose Fashmode. Choose 10.3.1.A.2.67 Generic UK. It will ask you to put the device into flashmode (Turn your device off, hold down volume DOWN and insert USB) and then it'll flash that ROM and do it's thing.
At the end of all that you should have C6603_10.3.1.A.2.67_Generic UK ROM on your phone.
The next step is to ROOT this. For the rooting process your phone needs to be ON. Enable developer options (Settings->about phone-> hit "Build Number" until it says "You are now a developer" press back and then go to Developer Options and check "USB debugging". Go back one more time and go into "Security" and check "Unknown Sources" **Have these are your "default settings" i.e. make sure you have these on all the time**
Download DoomLords root method from here: http://forum.xda-developers.com/xperia-z/development/root-how-to-rooting-firmware-10-3-1-0-t2386405
We need to flash a different kernel temporarily. So open FlashTool again and flash XperiaZ_C660X_KernelOnly_10.3.A.0.423_Generic_NL the exact same way you flashed the Generic UK ROM. Enable Unknown sources and USB debugging if you need to.
Just place the file on your desktop and unzip it. Delete the zip file. Keep the unzipped folder. You should get a folder with:
files
runme_linux.sh
runme_mac.sh
runme_win.bat
etc, etc.
Just remove the mac and windows files. We don't need them. Keep the "files" folder.
Remember you can use [TAB] complete. If you type "DooM" and then [tab] it should fill out the rest of the folder name for you.
Open up a new Terminal and put in these commands:
Code:
cd Desktop/DooMLoRD_Easy-Rooting-Toolkit_v18_perf-event-exploit
chmod ugo+x runme_linux.sh
./runme_linux.sh
and it'll do it's thing and root your phone!
Check this by seeing if "SU" app exists on your phone.
Turn your phone off. Flash "XperiaZ_C660X_KernelOnly_10.3.1.A.2.67.ftf" via FlashTool.
Now we have a rooted firmware!
Step 9.) Install recovery
Download NUT's dual recovery from here: http://www.fun-industries.nl/xda/do...kZHVhbHJlY292ZXJ5Mi41LjEtUkVMRUFTRS53aW5kb3dz
Put it on your Desktop and unzip it. You should get a folder called "lockeddualrecovery"
Open a new terminal and cd to the directory:
Code:
cd Desktop/lockeddualrecovery/
chmod ugo+x supersu.sh
./supersu.sh
It will do it's thing and install the recovery into your phone. Once it's done make sure it exists by turning it off and repeatedly tapping VOLUME UP. It should boot into CWM.
FINAL STEP: INSTALLING EXISTENZ
DO NOT UNZIP THESE FILES
Download the black version here: http://forum.xda-developers.com/xperia-z/development/rom-existenz-v5-black-edition-10-4-b-0-t2251512
Download the white version here: http://forum.xda-developers.com/xperia-z/development/rom-existenz-v5-0-0-ultra-edition-10-4-t2349656
Make sure you download SuperSU fix also.
Make sure all the terminal windows are gone. All you need to do is connect your phone to your computer and copy the above files to the phone. After they have copied:
Boot into CWM (Turn the phone off, turn it back on and press VOLUME UP repeatedly)
Go to Install ZIP (or something to that effect)
Select the ROM ZIP file and flash it.
After it's finished flash SuperSU fix.zip
Almost done. The ROM won't boot until you've 10.4.1.B.0.101 kernel. So make sure the phone is off. Open FlashTool and flash C6603_10.4.1.B.0.101_Stripped.ftf the same way as before.
Once it's finished turn your phone on and YOU HAVE EXISTENZ ROM!!!
One small addendum. For me my SuperSU was broken. If this is the case for you all you need to do is boot into recovery and select SuperSU fix, CWM will do it's thing and once it's done just turn your phone on and download SuperSU from the market place.
_______________________________________________________________________________________________________________________
Considerations:
1.) It's not necessary to flash "C6603_10.3.1.A.2.67_Generic UK.ftf" the aim here is to root the phone. You can use an older firmware version and root that using this method: http://forum.xda-developers.com/showthread.php?t=2327472
This avoids the need to flash a different kernel and then re-flashing the "C6603_10.3.1.A.2.67_Generic UK.ftf" kernel potentially saving YOU a lot of time.
2.) When using chmod it should be enough for you to type in "chmod u+x <filename>" the reason why I have changed the permissions of "group" and "other" is just to ensure that it works.
3.) There is a way to copy folder into the restricted /usr/lib folder. In terminal if you type in "gksudo nautilus" it will bring up a file manager GUI with root permissions that will allow you do drag and drop these folders.
4.) It's not necessary to move FlashTool into this folder. The reason why I have done it was to keep an organised filesystem. You can leave it on desktop and change the file paths appropriately.
5.) After you have rooted your phone. It may not be necessary to reflash the "XperiaZ_C660X_KernelOnly_10.3.1.A.2.67.ftf" kernel since you are going to flash an entire ROM anyway.
**Please suggest ways to make this tutorial easier to understand**

Categories

Resources