Related
Hello I frequent the boards...actually on a daily basis. I dont post a lot as you can see...mainly because the posts are usually thoroughly explained and I usually dont have a lot of problems that I cant already find the answers to.
I want to thank everyone who contributes to the board. I currently have the HTC hero and I have installed all but 1 of the current available roms, I had the Touch Pro before and the Touch prior to that. I have uses custom roms for all so a huge thanks to all the devs.
My reason for posting is I want to learn how to develop myself eventually but for now I have a specific question about getting the most out of my rooted HTC hero. Darchstar posted this:
adb shell remount
adb push e2fsck /system/bin
adb shell
cd /system/bin
chmod a+x e2fsck
a2sd
reboot
Its to enable apps2sd. I want to get a little help of understanding how to apply it. I rooted my phone so I did a lot of edits in cmd promt...but for me it was just a matter of following instructions I want to learn what I am actually doing and how to fully take advantage of rooting my phone. I dont use terminal emulator or SU really for anything because I dont understand how to use them or even the full extent of what they can do. I know theres a wiki...but I really dont know what to search. As of now I have been having devs do everything for me to an extent. I use a kitchen which is pretty much automated and I have just been following instructions on the board.
I am pretty good with computers, i build them and fix them all the time for people...and with phones also. Im a tech in a cellphone store so you can gather I am a tinkerer. I am not looking to be told how to do things and just follow the instructions I want to know what I am doing, even though here I have never been steered wrong. I want to be educated.
I know this post is long winded and I would like to thank everyone in advance for any help offered.
Patb8man said:
Hello I frequent the boards...actually on a daily basis. I dont post a lot as you can see...mainly because the posts are usually thoroughly explained and I usually dont have a lot of problems that I cant already find the answers to.
I want to thank everyone who contributes to the board. I currently have the HTC hero and I have installed all but 1 of the current available roms, I had the Touch Pro before and the Touch prior to that. I have uses custom roms for all so a huge thanks to all the devs.
My reason for posting is I want to learn how to develop myself eventually but for now I have a specific question about getting the most out of my rooted HTC hero. Darchstar posted this:
adb shell remount
adb push e2fsck /system/bin
adb shell
cd /system/bin
chmod a+x e2fsck
a2sd
reboot
Its to enable apps2sd. I want to get a little help of understanding how to apply it. I rooted my phone so I did a lot of edits in cmd promt...but for me it was just a matter of following instructions I want to learn what I am actually doing and how to fully take advantage of rooting my phone. I dont use terminal emulator or SU really for anything because I dont understand how to use them or even the full extent of what they can do. I know theres a wiki...but I really dont know what to search. As of now I have been having devs do everything for me to an extent. I use a kitchen which is pretty much automated and I have just been following instructions on the board.
I am pretty good with computers, i build them and fix them all the time for people...and with phones also. Im a tech in a cellphone store so you can gather I am a tinkerer. I am not looking to be told how to do things and just follow the instructions I want to know what I am doing, even though here I have never been steered wrong. I want to be educated.
I know this post is long winded and I would like to thank everyone in advance for any help offered.
Click to expand...
Click to collapse
The best way to learn about this stuff is to bite the bullet and install a Linux distro on your computer. I've also took up teaching myself to code Java in my spare time which will help you understand Android a lot better.
Also: You need an EXT partition on your SD to enable apps2sd. Is that what you're asking?
Thanks. I do have an ext partition on my card and it I am currently using it with gumbo 1.5c bare. I was just thinking about installing 2.1 and before I did I wanted to make sure I could enable app2sd. I was just using it as an example. I just want to learn in general. Is linus distro a version of the os I would dual boot with or does it emulate in windows? Also how did you just start java? A google search and article research, book or are you in school?
Patb8man said:
My reason for posting is I want to learn how to develop myself eventually but for now I have a specific question about getting the most out of my rooted HTC hero. Darchstar posted this:
adb shell remount
adb push e2fsck /system/bin
adb shell
cd /system/bin
chmod a+x e2fsck
a2sd
reboot
Its to enable apps2sd. I want to get a little help of understanding how to apply it. I rooted my phone so I did a lot of edits in cmd promt...but for me it was just a matter of following instructions I want to learn what I am actually doing and how to fully take advantage of rooting my phone. I dont use terminal emulator or SU really for anything because I dont understand how to use them or even the full extent of what they can do. I know theres a wiki...but I really dont know what to search. As of now I have been having devs do everything for me to an extent. I use a kitchen which is pretty much automated and I have just been following instructions on the board.
Click to expand...
Click to collapse
Basically these commands are installing the e2fsck, a program that formats a partition in the ext2 file system, so that apps2sd can run.
Here is a breakdown:
adb shell remount --remount the file system of your phone so you can write a file to it
adb push e2fsck /system/bin --copy the file/program e2fsck to the directory /system/bin on the phone
adb shell --switch from your computer's shell (cmd) to control the shell environment of the phone
cd /system/bin --change directory to work in /system/bin
chmod a+x e2fsck --change the permissions of e2fsck so that you can actually execute (run) it
a2sd --run apps2sd (a2sd) so that it can set itself up (it will call on e2fsck)
reboot --reboot the phone.
Hope that's what you were looking for.
Patb8man said:
Thanks. I do have an ext partition on my card and it I am currently using it with gumbo 1.5c bare. I was just thinking about installing 2.1 and before I did I wanted to make sure I could enable app2sd. I was just using it as an example. I just want to learn in general. Is linus distro a version of the os I would dual boot with or does it emulate in windows? Also how did you just start java? A google search and article research, book or are you in school?
Click to expand...
Click to collapse
(Sorry for double posting, folks... timing...)
I would highly recommend that you dual boot or install Linux on a spare computer until you are comfortable with it. If you want, you could run VirtualBox to emulate another system (VM) and install Linux there.
Is_907 said:
Basically these commands are installing the e2fsck, a program that formats a partition in the ext2 file system, so that apps2sd can run.
Here is a breakdown:
adb shell remount --remount the file system of your phone so you can write a file to it
adb push e2fsck /system/bin --copy the file/program e2fsck to the directory /system/bin on the phone
adb shell --switch from your computer's shell (cmd) to control the shell environment of the phone
cd /system/bin --change directory to work in /system/bin
chmod a+x e2fsck --change the permissions of e2fsck so that you can actually execute (run) it
a2sd --run apps2sd (a2sd) so that it can set itself up (it will call on e2fsck)
reboot --reboot the phone.
Hope that's what you were looking for.
Click to expand...
Click to collapse
for the adb shell remount part when i hook the phone up to the computer w debugging on when I run a command prompt how do I get to the adb in the first place. I am not familiar with that to begin with. I know I had to edit it when I rooted my phone...but like I said I really didnt understand what I was doing it was just a matter of following instructions. Thank you for the detailed description of whats going on...thats where I want to be where I can just see that and decipher it.
Patb8man said:
Thanks. I do have an ext partition on my card and it I am currently using it with gumbo 1.5c bare. I was just thinking about installing 2.1 and before I did I wanted to make sure I could enable app2sd. I was just using it as an example. I just want to learn in general. Is linus distro a version of the os I would dual boot with or does it emulate in windows? Also how did you just start java? A google search and article research, book or are you in school?
Click to expand...
Click to collapse
Install Ubuntu Linux dual-boot, or short of that install VirtualBox or VMWare with Ubuntu running as a VM. You might also look at Wubi, a way to install Linux within Windows. I've never used it but it looks interesting.
Also, as with darch's post you mention, I'm no dev, learning as I go, but I use my Unix/Linux terminal chops MUCH more than java. Learn java if you want to write apps but if you want to help hack on ROM's, learn to use the shell. Android is Linux, after all.
As with anything, the best way to learn is to dive in.
Patb8man said:
for the adb shell remount part when i hook the phone up to the computer w debugging on when I run a command prompt how do I get to the adb in the first place. I am not familiar with that to begin with. I know I had to edit it when I rooted my phone...but like I said I really didnt understand what I was doing it was just a matter of following instructions. Thank you for the detailed description of whats going on...thats where I want to be where I can just see that and decipher it.
Click to expand...
Click to collapse
adb is a utility that is in the tools folder of the android sdk, which you probably already have somewhere, because it is used to root the phone. Then you'll open up a command prompt, and navigate to the tools folder of the sdk. You'll 'navigate' using the 'cd' command. Once you're navigated the command prompt to the tools folder, you can run the adb program that is in it.
Edit: in general, it can be really helpful to know both DOS and UNIX commands, even if it's just the basic ones pertaining to copying, deleting, moving, renaming, etc. Here are two good cheat sheets: http://www.computerhope.com/overview.htm http://www.computerhope.com/unix/overview.htm
Yeah, just go Start > Run > cmd (or if you're on Vista/Win7 do Start > cmd > Enter)
I do this once I have cmd running:
cd D:\Downloads\android-sdk-windows\tools
D:
adb devices
adb remount
5tr4t4 said:
Install Ubuntu Linux dual-boot, or short of that install VirtualBox or VMWare with Ubuntu running as a VM. You might also look at Wubi, a way to install Linux within Windows. I've never used it but it looks interesting.
Also, as with darch's post you mention, I'm no dev, learning as I go, but I use my Unix/Linux terminal chops MUCH more than java. Learn java if you want to write apps but if you want to help hack on ROM's, learn to use the shell. Android is Linux, after all.
As with anything, the best way to learn is to dive in.
Click to expand...
Click to collapse
Thanks very good stuff. I will check it out.
Thanks to everyone who posted so far I can see I will be up late tonight LOL.
illogic6 said:
The best way to learn about this stuff is to bite the bullet and install a Linux distro on your computer. I've also took up teaching myself to code Java in my spare time which will help you understand Android a lot better.
Also: You need an EXT partition on your SD to enable apps2sd. Is that what you're asking?
Click to expand...
Click to collapse
To expand on what illogic6 said about installing a distro on your computer, if you're just learning, it's not totally necessary to do that!
If you're a nerd like me, then you've got an old PC lying around that you can cannibalize for an Ubuntu box (a GREAT first distro to try!) btw, I think I have about 5 extra pcs laying around, which makes me an uber nerd, surely outdone though by others on this board.
However, if you DON'T have an extra pc lying around, no need to fret or worry about Dual Booting. While those are the most optimal, you can certainly try some live CD/DVDs which will boot from optical media, and not harm your existing install of your OS that's currently on the PC you're trying it on.
I did that a lot before I got into having a main Linux box at home. I tried Ubuntu (still one of my faves) Knoppix, Mandriva, Mint, and some others. I was really big at the time in getting Compiz fusion and Beryl to run (basically a badass window manager with 3d effects similar to Mac but with some cool extras.) Getting into that came with a huge price...LOTS and LOTS of command line work. It forced me to learn a lot about the Command line. And now, I feel completely comfortable doing those commands that folks share. It's essentially understanding the command line. Immerse yourself, and you'll learn a ton!!
Btw, to try ubuntu, just download the install CD. Now they offer as part of the start up menu the live cd option. It will say something to the effect of "Try Ubuntu without changing your computer's configuration" or something like that.
As always, if you have any questions or want me to clarify anything, feel free to respond to this or PM me, I'd be happy to steer you in the right direction!
kmartburrito said:
To expand on what illogic6 said about installing a distro on your computer, if you're just learning, it's not totally necessary to do that!
If you're a nerd like me, then you've got an old PC lying around that you can cannibalize for an Ubuntu box (a GREAT first distro to try!) btw, I think I have about 5 extra pcs laying around, which makes me an uber nerd, surely outdone though by others on this board.
However, if you DON'T have an extra pc lying around, no need to fret or worry about Dual Booting. While those are the most optimal, you can certainly try some live CD/DVDs which will boot from optical media, and not harm your existing install of your OS that's currently on the PC you're trying it on.
I did that a lot before I got into having a main Linux box at home. I tried Ubuntu (still one of my faves) Knoppix, Mandriva, Mint, and some others. I was really big at the time in getting Compiz fusion and Beryl to run (basically a badass window manager with 3d effects similar to Mac but with some cool extras.) Getting into that came with a huge price...LOTS and LOTS of command line work. It forced me to learn a lot about the Command line. And now, I feel completely comfortable doing those commands that folks share. It's essentially understanding the command line. Immerse yourself, and you'll learn a ton!!
Btw, to try ubuntu, just download the install CD. Now they offer as part of the start up menu the live cd option. It will say something to the effect of "Try Ubuntu without changing your computer's configuration" or something like that.
As always, if you have any questions or want me to clarify anything, feel free to respond to this or PM me, I'd be happy to steer you in the right direction!
Click to expand...
Click to collapse
Thanks I just downloaded wubi...any thoughts on that. I havent installed it yet. But it seems harmless based on the faq.
illogic6 said:
The best way to learn about this stuff is to bite the bullet and install a Linux distro on your computer.
Click to expand...
Click to collapse
You make Linux sound so bad, lol.
edit:
From the description, Wubi seems safe, but personally, I think playing with a shell to familiarize yourself with Command lines in terminal is jsut as good as a learning experience.
I, also, don't know how Wubi would be since it seems to run on Windows as an application. I'm not sure it'll provide such the necessary environment or tools that Linux has.
WUBI is a great way to get started with Linux. First, it WILL NOT damage any of your data, so it is 100% safe. Basically what is does is install Ubuntu Linux to a file, and then the file is added to the Windows bootloader. Now when you boot the Ubuntu Linux file, you will be in a non-emulated version of Ubuntu Linux, except for the fact it is running inside of a Windows partition.
Patb8man said:
Thanks I just downloaded wubi...any thoughts on that. I havent installed it yet. But it seems harmless based on the faq.
Click to expand...
Click to collapse
Oh yeah, I forgot about Wubi! It's pretty badass if I remember correctly. I'm still a little old-school and have a cd case full of live cds and dvds
That should be perfect for you!
My advice though, FORCE yourself to use the command line, as that's really where the power of Linux (and Android for that matter as you're seeing firsthand) lies.
Here's a link to a page that has some command line primers to get you started.
http://linux.byexamples.com/archives/319/command-line-tutorial-for-beginners/
I'd find something though that gets you to use the command line. Ubuntu is REALLY user friendly, and you can do a ton without touching the terminal application (where the command line lies) So find something, like Compiz Fusion for example, where you'll have to do some command line work to get it running.
once you find yourself going to the ubuntuforums.org to find out how to get something to work, you'll be on the right track
kmartburrito said:
Oh yeah, I forgot about Wubi! It's pretty badass if I remember correctly. I'm still a little old-school and have a cd case full of live cds and dvds
That should be perfect for you!
My advice though, FORCE yourself to use the command line, as that's really where the power of Linux (and Android for that matter as you're seeing firsthand) lies.
Here's a link to a page that has some command line primers to get you started.
http://linux.byexamples.com/archives/319/command-line-tutorial-for-beginners/
I'd find something though that gets you to use the command line. Ubuntu is REALLY user friendly, and you can do a ton without touching the terminal application (where the command line lies) So find something, like Compiz Fusion for example, where you'll have to do some command line work to get it running.
once you find yourself going to the ubuntuforums.org to find out how to get something to work, you'll be on the right track
Click to expand...
Click to collapse
ool yeah I added that to the bookmarks. I cant wait to get started...Im gonna install Wubi later tonight.
mrinehart93 said:
WUBI is a great way to get started with Linux. First, it WILL NOT damage any of your data, so it is 100% safe. Basically what is does is install Ubuntu Linux to a file, and then the file is added to the Windows bootloader. Now when you boot the Ubuntu Linux file, you will be in a non-emulated version of Ubuntu Linux, except for the fact it is running inside of a Windows partition.
Click to expand...
Click to collapse
Sounds extremely less complicating than setting up Grub, will definitely look into Wubi for my netbook
+1 for forcing yourself to use CLI (command line interface.)
When I first learned Linux KDE and Gnome were almost the only options and they were very immature... so most of us had to learn everything the old fashioned way first
@kniteshift: GRUB is way easier to set up now than it used to be. GRUB 1.x was horrid. 2.x is super simple, IMO. And way more versatile than LILO. [end aside]
^
I haven't touched my netbook in ages, I'll check it out. Thanks!
You can also look into setting up a persistent installation of Ubuntu on a USB drive.
I use that on my netbook a lot.
Persistent meaning it has a partition to keep track of changes you make. You can basically use it like a normal full install of Ubuntu. Plus you can move it from PC to PC if necessary too. Here's some links for info if you wanted to try it sometime:
https://wiki.ubuntu.com/LiveUsbPendrivePersistent
And the site that made this option famous:
http://www.pendrivelinux.com/
Plus, this makes you look like a Badass. Or a huge dork. I prefer the former.
I just thought I'd throw this script up here in case any Linux users want something to play with. I use it for copying nightly ROMs to my phone for flashing. It simply gives a file selection dialog, allows the user to select files, and copies them via adb to a specified directory on the phone.
There's really not much to it, but it can be edited to point to any directory (I use /sdcard/Android-updates on my phone because it shows up at the top when I want to flash.)
Prerequisites:
Linux distro with gtk/gnome installed.
Zenity installed.
Working adb with normal-user privileges.
Just re-name the file, changing the extension to ".sh" and in the right-click "properties" dialog, change the permissions to make it executable.
So by using
Code:
adb pull /system/ [destination folder name]
I can pull every file off of my android phone's foreseeable memory, correct? Every time I have flashed or pushed anything through ADB, I never quite understood where things were located or what exactly I'm doing. I feel like pulling every file/directory off of the phone will give me some insight into how the hierarchy works, especially being able to browse it with a GUI.
Am I correct, or is there something I'm missing?
I'm not familiar with adb, but a file explorer is an easy way to poke around the file system and learn where things are. Just don't go on a deleting spree and you'll be fine.
epic4GEE said:
I'm not familiar with adb, but a file explorer is an easy way to poke around the file system and learn where things are. Just don't go on a deleting spree and you'll be fine.
Click to expand...
Click to collapse
I have done that, was just kind of hoping for a better GUI alternative. I'm much faster with a Mouse and Keyboard than I am with a touch screen.
Although attempting to pull a directory has resulted in an interesting problem - when using the command above, it doesn't pull all the files. It pulls some and then stops. Any idea why?
From your PC, type 'adb shell'. Now you're logged on to your phone in an interactive session with a shell prompt, and can explore from your PC terminal window.
It's linux, so you'll have to learn some linux commands, if you don't know them already. For exploring the filesystem, 'cd' and 'ls' are the main ones you'll need.
Sent from my mind using telepathitalk
dwallersv said:
From your PC, type 'adb shell'. Now you're logged on to your phone in an interactive session with a shell prompt, and can explore from your PC terminal window.
It's linux, so you'll have to learn some linux commands, if you don't know them already. For exploring the filesystem, 'cd' and 'ls' are the main ones you'll need.
Sent from my mind using telepathitalk
Click to expand...
Click to collapse
Hmm, well I've used adb shell before. Wasn't sure what to do from here, though. Will all linux commands work or just some?
rjhall said:
Hmm, well I've used adb shell before. Wasn't sure what to do from here, though. Will all linux commands work or just some?
Click to expand...
Click to collapse
I believe all the basic commands will work.
cd, ls, mkdir, rmdir, rm, ect,ect.
I like Droid Explorer:
http://de.codeplex.com/
looks like and works like Windows Explorer, lets you browse both the "phone" storage (system, etc) and the sdcard. Pure GUI.
When I try to cd to any of my directories on my phone, it says access denied. Do I need root? And is there a way to manually gain root with the Epic 4G? I tried the whole one click root BS, it doesn't work - just freezes. I'd rather do it manually anyway, but I can't seem to find a single guide with a comprehensive file list! None of the stickies seemed to match what I was looking for either, or the links were dead.
Hello everyone
Have you ever been bored in a borrowed pc and wanting to try out a new library/idea on your android but dont have admin privileges to install all the needed android tools? I was in this exact same situation, so i decided to engineer a solution (After all, i AM an engineering student ) to this boring problem. This solution works almost entirely like a standard Android SDK install (Only downside: Eclipse won't run your application) and has only been tested on Ubuntu Linux so you are on your own on other platforms, but the principle is the same, it might work after all.
Whenever prompted for a platform choose x86 , x64 needs ia32-libs which you cant install due to not having admin privileges
1. Create a directory for all the files and folders (I'll name mine "Development")
2. Download the JDK tar.bz file from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1637583.html (You'd better search for an updated link when you read this tho) and extract it into Development
3. Download eclipse from http://eclipse.org/downloads/ (I used the Eclipse IDE for Java Developers) and extract it into the Development folder
4. Download the Android SDK from http://developer.android.com/sdk/index.html (If you are on windows, choose the zip!. Again, i've only tested on Linux so you are on your own) and extract it into the Development folder
5. Open the tools/android (It's a shell script) file with gedit/any other editor and edit the line containing java_cmd=".." to read java_cmd="/home/xxx/Development/jdk1.7.0_06/bin/java" (This is my case, make sure this line actually points to the place where you extracted the jdk zip, else this will fail)
6. Open a terminal, cd to the location where you extracted the android sdk, then type "./tools/android" and press enter (Without the quotation marks) to start the sdk manager, install the platform-tools package, the Jellybean (4.1) SDK, and any other SDK you may want, then close the SDK manager.
7. cd to the Development folder and run this "./eclipse/eclipse -vm jdk1.7.0_06/bin" (Assuming you kept the stock folder names from the zips) to run eclipse, then install the ADT as described here http://developer.android.com/sdk/installing/installing-adt.html.
8. When eclipse restarts, it will ask you for the android sdk, just point it to the location where you extracted it.
That's it, your eclipse installation is ready for you to write code.
Now, to debug you'll need to do so manually as eclipse won't somehow recognize this workaround to the usb priviliges (Linux won't allow adb to communicate with the phone unless it's ran as root [Which you can't, that's why you are here] or a configuration file [Again, written as root] is present) system so you need to do this to make adb work:
1. Disconnect your phone from 3G (Optional)
2. Connect your phone to your pc via usb
3. Enable usb tethering on your phone
4. Enable ADB over Network on Application settings
5. On the terminal emulator, run "ip addr show" and look for the usb section
6. On your computer, open a terminal and cd to the tools directory fo the android sdk, then type "./adb connect xxx.xxx.xxx.xxx" (Replace the x's with the IP of your phone, as it appears on the output of the previous command. Remember to use the one on the USB section)
7. Verify adb picked up your device by runing "./adb devices", if it lists an IP as a device, you are ready
Each time you want to test your app, export a signed apk from your project (I may write a small guide for that later, google will help you if you dont know how to do it) and run "./adb install xxx.apk" (Obviously, replace xxx with the path to your exported apk). The icon(s) for your main activity(ies) will promptly appear on your launcher. Again, Eclipse won't run nor debug your app using this method. (Maybe it's an SDK bug?)
I know it's not exactly streamlined but it's something for when you are on the go.
Hope you find this guide useful someday. Until next time.
For sometime now I have been meaning to write-up some of my notes and share some of the things I found can be done with webtop. I have a lapdock that I use it with my Atrix, I also have a HD dock connected to a monitor/keyboard/mouse/speakers.
Much of the following is just documenting the linux programs that are installed on the webtop and how they can be configured. You will need to have a terminal program to do most things covered in this post (not the android terminal program, but either lxterminal or xterm) and a text editor.
I use SystemR89's webtopMod to run a full debian distribution in a chooted jail (http://forum.xda-developers.com/showthread.php?t=1093790), this is not necessary for most of what this post will cover but it does install lxterminal and a lightweight text editor (leafpad) into your webtop.
AWN (the menu at the bottom of the webtop screen)
awn-manager is included in webtop and it allows you add/delete programs from the menu at the bottom of the screen. Before you use awn-manager the first time you will need to type the following command at the terminal prompt:
sudo chmod 777 /usr/share/applications/*
Then you can just type in awn-manager and click on launchers and start changing/adding/deleting things. Alternatively you can modify the appropriate files manually.
The configuration file that has the list of menu items is:
~/.gconf/apps/avant-window-navigator/window_manager/%gconf.xml
If you make manual changes to this file you will need to reboot for the changes to take effect (if you use awn-manager all changes take effect immediately).
As you will notice the menu configuration file references “.desktop” files. I am not going to cover the structure of the desktop files, there are a lot of good references out there covering this, just take a look at what is in them, the structure it is pretty straightforward. A number of the desktop files are found here:
/usr/share/applications
but the ones created by awn-manager will be put here:
~/.config/awn/launchers
If the program or command will only be run from the awn menu this directory is probably the best place to put the desktop file. If you are going to associate the program with a file type (more on this latter) you may want to put the desktop files in the following directory:
~/.local/share/applications
any weblinks that you create by using the plus in the right hand side of the bottom awn menu bar will be put here:
~/.config/webtop-icon
and a good place to stick any custom icons that you are going to be using is here:
~/.config/awn/custom-icons
the default set of icons that awn-manager accesses are found here
/usr/share/pixmaps//usr/share/icons
to launch an android program in the mobileview window (aka aiw) you will need to use androidlauncher, here are a couple examples of how to do this:
androidlauncher --action "android.intent.action.VIEW" --uri "content://com.android.contacts/contacts"/usr/local/bin/androidlauncher --action "android.intent.action.MAIN" --cmp "uk.co.nickfines.RealCalc/.Calculator"
you can look in the desktop files found in the /usr/share/applications directory to see some examples of how to launch various android programs you can also use the android app alogcat from the market to see what command is executed when you launch an android app on your phone.
Nautilus (the file manager)
Nautilus is filemanager used by webtop, it has been significnatly modified by Motorola so don't expect all of the normal features to work. If you look at the entry for the file manager using awn-manager you will see that the following command is used to launch the program:
nautilus --no-desktop --browser /mnt/sdcard
In webtop the default preferences for nautilus are set up so that you can leave out the -no-desktop and -browser switches if you want. The /mnt/sdcard entry specifies which directory nautilus should start in. You can specify nautilus to start in the root (/) directory, but it won't have root privileges, so it is not a replacement for root explorer (or similar). If gksu was included in webtop you should have been able to run nautilus with root privileges by typing in:
gksu nautilus --no-desktop --browser /
but when I installed gksu and tried this it did not work.
If you want to have additional directories listed on the left panel in nautilius you can edit the file:
~/.gtk-bookmarks
You can add some functionallity to nautilus by creating scripts. After you create a script an option to run the script will appear under the files menu and come up when you right click. The scripts files are kept in the following directory:
~/.gnome2/nautilus-scripts
I have attached a couple of scripts that I use, you can also check out:
http://linux.about.com/library/gnome/blgnome6n13a.htm
http://g-scripts.sourceforge.net/faq.php
You can view the preferences that are set for nautilus by using:
gconftool-2 -R /apps/nautilus/preferences
I played around with changing some of the preferences, I tried to turn on an address bar but the bread crumbs disappeared instead, I found that you can enable move-to-trash but it only works for linux filesystems (i.e. it works for your home directory but not for FAT filesystems like sdcard or sdcard-ext, although you might be able to fix this by putting appropriate entries in fstab with uid=1000 in the entry, I wrote a move to trash script instead)
It does not appear that the motorola webtop nautilus directly supports accessing network files, but if you are using a kernel with cifs support (or cifs manager from the market) you can mount network directories and then access them through nautilus.
Nautilus has saved searches built in (ctrl-f), search by name works but search by filetype does not work (you can search by file name, such as mp3, but it you tell it to find all audio files it does nothing). I guess they figured they have their smartfolders for that (Phone Music, Phone Images, Phone Video). By the way if you freeze or remove webtop connector then items will no longer be added to the smartfolders.
pcmanfm (an alternative filemanager in webtop)
There is a lightweight alternative to the nautilus file manager included in webtop called pcmanfm. To launch it with the sdcard directory showing type the following:
pcmanfm --no-desktop /mnt/sdcard
if you want to launch it with root privileges in the root directory type the following
sudo pcmanfm --no-desktop /
(I know you should be using gksu instead of sudo, but this works and gksu is not included with webtop).
Some of the nice features of pcmanfm:
It can run with root privileges (see above)
It has an address bar, so you can just type in the directory you want to instead of navigating the directory tree
It has an open terminal window here function built in (tool – open terminal)
There is a bookmarks menu where you can change the directories shown in the left pannel without having to edit ~/.gtk-bookmarks
File associations
If you want a specific application to launch when you double click on an item in the file manager you can change the entries in the following files:
~/.local/share/applications/defaults.list
~/.local/share/applications/mimeapps.list
To have several “open with” options when you right click on a file you can put several entries on a line. The following is an example of an entry:
image/jpeg=gpicview.desktop;MobileView.desktop;firefox.desktop
This enrty is telling the file manager to use gpicview.desktop to open the file if you double click on a jpep and to offer the options “open with gpicview”, “open with Mobile View” and “open with firefox” if you were to right click on a jpeg file.
The file manager will use gpicview.desktop that is found in /usr/share/applications/ unless there is a gpicview.desktop file in ~/.local/share/applications/
I have attached the files that I use for
~/.local/share/applications/defaults.list
~/.local/share/applications/mimeapps.list
You will probably have to edit these file because some of the file associations I have set up launch programs in the chrooted linux environment.
Linux applications included with webtop
Functional and useful linux programs included in webtop
nautilus: file manager
pcmanfm: file manager
firefox: web browser
awn-manager: menu editor
xarchiver: file archive manager (zip/tar)
gpicview: a simple image viewer
epdfview: pdf viewer
Gnome programs - most of the gnome programs are crippled/semi-functional, but the following two seem to work well:
gnome-dictionary: online dictionary
gnome-screenshot: screenshot/capture utility
If you look at the "exec" entry in the desktop files located in /usr/share/applications you can see what other programs are included in the webtop distribution.
Swap
I am not certain if the stock atrix kernel has swap support, I am using faux123's kernel, perhaps someone could comment on if the stock kernel's swap support.
I find that I need to set up swap space if I want to use the webtop for anything more than occasional web browsing. Before I enabled swap webtop was regularly warning me that I had low memory (and you can't close the warning message, which is really annoying).
The first thing I tried was using zram for swap (fuax123's kernel supports this). I DO NOT recommend using zram for swap.
BEWARE, ZRAM CAUSES YOUR PHONE TO CRASH REGULARLY
Next I looked into setting up a swap partition; however, after a little research I found out that the complexity of setting up a swap partition is a waste of time, you can get the same performance using a swapfile. Accordng to Wikipedia (http://en.wikipedia.org/wiki/Paging#Linux):
From a software point of view with the 2.6 Linux kernel, swap files are just as fast[14][15] as swap partitions. The kernel keeps a map of where the swap file exists, and accesses the disk directly, bypassing caching and filesystem overhead.[15] Red Hat recommends using a swap partition.[16] With a swap partition one can choose where on the disk it resides and place it where the disk throughput is highest. The administrative flexibility of swap files can outweigh the other advantages of swap partitions. For example, a swap file can be placed on any drive, can be set to any desired size, and can be added or changed as needed. A swap partition, however, requires that it be set for the entire hard drive, and once the size of a swap partition is set, it can't be changed without using tools to resize the entire drive.
To create a 512MB swapfile, type the following commands in the terminal:
dd if=/dev/zero of=/sdcard-ext/.swapfile bs=1M count=512
sudo mkswap /sdcard-ext/.swapfile
This is probably bigger than I need, I don't think I have ever used more than 100MB of swap. I use a "." as the first part of the filename, this makes the file a "hidden" file in linux and therefore the file is less likely to get accidentally deleted or moved.
Next, turn on the swap:
sudo swapon /sdcard-ext/.swapfile
and make sure it is working:
free
You will want to add the following line to the file /etc/fstab:
/sdcard-ext/.swapfile swap swap defaults 0 0
and the following line to /etc/sysctl.conf
vm.swappiness=10
(you may actually want to try a value less than 10, the lower the value the less the phone will swap)
Running full debian in a chooted jail (webtopMod)
As I mentioned in the first post I use SystemR89's webtopMod to run a full debian distribution in a chooted jail (http://forum.xda-developers.com/showthread.php?t=1093790)
You can install a number of very useful and fully functional linux programs in the chrooted environment and then access them from the awn menu (or if you have the file associations set up properly in defualts.list and mimeapps.list you can launch the files by double clicking on a file in the file manager).
*IMPORTANT* Some of the commands must be executed in the chrooted environment and some must be executed in the non-chrooted environment (i.e. the normal webtop environment). The following instructions tell you which environment you need to use for each command.
Once you have webtopMod installed I would recommend that the first thing you do is open an xterm window in the chrooted environment (click on the penguin and select the proper menu item for xterm) and install synaptic in the chrooted environment:
apt-get install synaptic
You can then use synaptic to install other linux programs/packages, such as lxterminal, OpenOffice, mtpaint (gimp runs but it is really slow).
I have modified the script that SytemR89 uses to launch the chrooted environment (attached), you can replace the original script by following these steps in the non-chrooted environment:
Save the attached file,
Rename it from linux.txt to linux
Copy it to /usr/sbin
Set the permissions properly (sudo chmod +x /usr/sbin/linux)
If you want to launch a program in the chrooted environment you can do it by typing the following in the non-chrooted environment:
linux oocalc
where oocalc is the name of a program that you have installed in the chrooted environment.
A couple of final things, you may want to setup a symlink in the chrooted environment for /sdcard (and sdcard-ext). If I recall correctly, SytemR89 was just mounting /sdcard (and /sdcard-ext) in the chrooted environment and I changed the script to mount /mnt/sdcard instead (why? so that the chrooted directories would be set up the same as the non-chrooted environment). To make a symlink between /mnt/sdcard and /sdcard in the chrooted environment. First launch an xterm window for the chrooted environment, then type in the following commands:
sudo umount /sdcard
sudo umount /mnt/sdcard
sudo mkdir /sdcard
sudo mkdir /mnt/sdcard
sudo ln -s /mnt/sdcard /sdcard
sudo umount /sdcard-ext
sudo umount /mnt/sdcard-ext
sudo mkdir /sdcard-ext
sudo mkdir /mnt/sdcard-ext
sudo ln -s /mnt/sdcard-ext /sdcard-ext
You may get some errors telling you that something was not mounted or that a directory exists, just ignore the error(s).
Then reboot.
I also created a directory /usbdrive in the chroot'd linux environment and use the following command to mount a usb drive so that the chrooted environment can access it (run this command from the non-chooted environment)
sudo mount -t vfat /dev/block/sda1 /osh/opt/WebTopMOD/root/usbdrive
Many thanks for posting this, it's an excellent guide.
tamuin said:
I am not certain if the stock atrix kernel has swap support, I am using faux123's kernel, perhaps someone could comment on if the stock kernel's swap support.
I find that I need to set up swap space if I want to use the webtop for anything more than occasional web browsing. Before I enabled swap webtop was regularly warning me that I had low memory (and you can't close the warning message, which is really annoying).
The first thing I tried was using zram for swap (fuax123's kernel supports this). I DO NOT recommend using zram for swap.
BEWARE, ZRAM CAUSES YOUR PHONE TO CRASH REGULARLY
Next I looked into setting up a swap partition; however, after a little research I found out that the complexity of setting up a swap partition is a waste of time, you can get the same performance using a swapfile. Accordng to Wikipedia (http://en.wikipedia.org/wiki/Paging#Linux):
From a software point of view with the 2.6 Linux kernel, swap files are just as fast[14][15] as swap partitions. The kernel keeps a map of where the swap file exists, and accesses the disk directly, bypassing caching and filesystem overhead.[15] Red Hat recommends using a swap partition.[16] With a swap partition one can choose where on the disk it resides and place it where the disk throughput is highest. The administrative flexibility of swap files can outweigh the other advantages of swap partitions. For example, a swap file can be placed on any drive, can be set to any desired size, and can be added or changed as needed. A swap partition, however, requires that it be set for the entire hard drive, and once the size of a swap partition is set, it can't be changed without using tools to resize the entire drive.
To create a 512MB swapfile, type the following commands in the terminal:
dd if=/dev/zero of=/sdcard-ext/.swapfile bs=1M count=512
sudo mkswap /sdcard-ext/.swapfile
This is probably bigger than I need, I don't think I have ever used more than 100MB of swap. I use a "." as the first part of the filename, this makes the file a "hidden" file in linux and therefore the file is less likely to get accidentally deleted or moved.
Next, turn on the swap:
sudo swapon /sdcard-ext/.swapfile
and make sure it is working:
free
You will want to add the following line to the file /etc/fstab:
/sdcard-ext/.swapfile swap swap defaults 0 0
and the following line to /etc/sysctl.conf
vm.swappiness=10
(you may actually want to try a value less than 10, the lower the value the less the phone will swap)
Click to expand...
Click to collapse
Thanks a lot, I was just starting to configure zram right before reading your post. :good:
Please explain just two things to me:
- Did you automated this to always enable swap? If so, how (init.d scripting)? EDIT: forget about... I didn't realize what changes in /etc/fstab will do...
- You've created the swap file in the external SDCard. Isn't better to create it on EMMC? EDIT: I've created the file on EMMC cause it's much faster and seems to be Ok!!!
Regards...