programming ON my android phone (etc) - G1 Android Development

Greetings gentlefolks.
This forum has been an absolute godsend. I managed to get the latest JF os installed and as such am thoroughly enjoying my G1.
In the past, I had a Windows Mobile phone from HTC. One of my favorite applications on it was Pocket Scheme because it enabled me to write code ON my phone. I'd love to eventually spend time working on software FOR my G1, but right now I'm interested primarily in writing code while on the train, in line, etc.
As far as I know, Pocket Scheme is not available on the Android. I also came across Ruby for Android [2], but so far it force closes as soon as I open it.
So:
1. Are there any languages that are available for writing code on the android? Something with either an included editor AND repl (like Pocket Scheme) or even just an editor (?) or a repl (like Ruby for Android) would be fine.
2. What editor for making "plain text" files with any extension do you use?
3. In desperation I tried using echo to create a new shell script file the other day, and Android OS complained that the file system was read only. Can I make it r/w from within the android, or do I need to use ADB?
Thanks in advance. I tried googling for answers, but to no avail.
[1] http://www.mazama.net/scheme/pscheme.htm
[2] http://code.google.com/p/android-ruby/

Well you could flash Debian to a JF build and go from there.

You can remount it as r/w from the device. I can't remember exactly what the command is but it is something along the lines of "mount -oremount,rw /dev/block/mtdblock0 /system" anyone care to correct me if that is wrong? You can also use DroidSans Tweak Tools available free in the market, just don't use the lite version

Geniusdog254 said:
You can remount it as r/w from the device. I can't remember exactly what the command is but it is something along the lines of "mount -oremount,rw /dev/block/mtdblock0 /system" anyone care to correct me if that is wrong? You can also use DroidSans Tweak Tools available free in the market, just don't use the lite version
Click to expand...
Click to collapse
almosst correct on the command there, there is actually a space between the "-o" and "remount" so it should read
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
that would make your system partition read write, but if you wanna run shell scripts i would go grab gscript and just write them in there.
oops i typed it wrong i switched the rw and remount, it's fixed now sorry

tubaking182 said:
almosst correct on the command there, there is actually a space between the "-o" and "remount" so it should read
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
that would make your system partition read write, but if you wanna run shell scripts i would go grab gscript and just write them in there.
Click to expand...
Click to collapse
Haha that's funny. Ive been typing: "mount -o rw, remount -t yaffs2 /dev/block/mtdblock3 /system"
But. That's just what works for me. Found it when I first rooted my phone.

Related

Terminal Emulator Update

There is an update for Terminal Emulator in the market I am wondering how you can uninstall it from JF 1.41 RC33 in order to get the update
you can use in terminal
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock03 /system
rm /system/app/com.android.term.apk
or navigate to system/app
rm com.android.term.apk
It will close the terminal right away for obvious reasons and then you can load the one from the market.
Just tested it and it works and doesn't seem to have any adverse affects. Mine is still working
I dont see any difference in the app to me looks the same no changes that I can tell.
savethechicken said:
you can use in terminal
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock03 /system
and the navigate to system/app or you can you use
rm system/app/com.android.term.apk
It will close the terminal right away for obvious reasons and then you can load the one from the market.
Just tested it and it works and doesn't seem to have any adverse affects. Mine is still working
I dont see any difference in the app to me looks the same no changes that I can tell.
Click to expand...
Click to collapse
I keep getting permission denied
are you type su first before mounting the image to get full superuser access.
The only difference we have if your signature is right is that im running the 1.41 RC33 but i was able to remove any apks i wanted this same way when i was on RC30
Yeah I typed su and got the superuser going... Maybe I am just oo much of a noob at this I am running the new JF RC33 update too
make sure that you are not typing anything in quotes "quotes just to show spaces" this is where i had the most problems when i started using this code
su
mount "space" -o "space" rw,remount "space" -t "space" yaffs2 "space" /dev/block/mtdblock03 "space" /system
then the long way
cd system
cd app
rm com.android.term.apk
that might help
Sweet I got it working thanks a million
Is there any reason why the new version is better than the one we have already?
not a problem.
I personally dont see any difference in it but everything still seems to be working

[Q] Command to install apps from terminal.

Sorry if this has already been asked. I tried searching and couldn't seem to find clear terminal commands. All of them either didn't seem to work, or were actually adb commands.
What are the exact commands for installing an app through terminal?
I'm trying to find the easiest commands to help a friend that needs to install an app on his phone. He doesn't have a data plan so he can't go into the market to install it, and isn't near the computer for adb.
I've used this command set before to install an app to system before:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cat /sdcard/'name-of-app'.apk > /system/app/'name-of-app'.apk
mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
But that is a little to complicated for him, and would be especially hard to explain over the phone, because like I said, he has no data plan.
Now I've seen this command around here:
su
cd /sdcard
install 'name-of-app'.apk /system/app/'name-of-app'.apk
But I tried that on my phone before giving it to him and it didn't seem to work.
So what are the commands for installing an app through the terminal to either system or data?
Install the sdk...
adb install application.apk
Sent from my HTC Liberty using XDA App
You just have to copy the application to /system/app (cp command), /system/ has to be mounted first of course.
SliestDragon said:
Sorry if this has already been asked. I tried searching and couldn't seem to find clear terminal commands. All of them either didn't seem to work, or were actually adb commands.
What are the exact commands for installing an app through terminal?
I'm trying to find the easiest commands to help a friend that needs to install an app on his phone. He doesn't have a data plan so he can't go into the market to install it, and isn't near the computer for adb.
I've used this command set before to install an app to system before:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cat /sdcard/'name-of-app'.apk > /system/app/'name-of-app'.apk
mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
But that is a little to complicated for him, and would be especially hard to explain over the phone, because like I said, he has no data plan.
Now I've seen this command around here:
su
cd /sdcard
install 'name-of-app'.apk /system/app/'name-of-app'.apk
But I tried that on my phone before giving it to him and it didn't seem to work.
So what are the commands for installing an app through the terminal to either system or data?
Click to expand...
Click to collapse
Sent from my HTC Magic using XDA App

[Q] Remount writable by all users?

Hi, this is a blatant crosspost from the android stackexchange site, questions/24081... I posted it there and figured I wouldn't get much help, so I thought I'd try here. Let me know if this is OT or in the wrong place or whatever.
I want to remount a read-only partition in read-write mode, but I want it to be writable for all users.
So far I've got this:
Code:
mount -o bind /someplace /someplace_else
mount -o remount rw /someplace_else
The first command creates a new mount point from a directory. The second one remounts the new mount point as rewritable. This all works.
Problem is, the new mount point has uid=1000,fmask=0222,dmask=0222, so the non-root user still can't write anything, and root can't give it permission.
How do I change the fmask and uid when remounting, or is there something else I can do to make the mount writable for the normal user?
Also, note that the command that worked for me is this:
Code:
mount -o remount rw /someplace_else
...with no comma between "remount" and "rw," as I've seen in almost everything my searches turned up. Does anyone know anything about this discrepancy in syntax?
I'm doing most of this in a terminal emulator on the phone, and in SL4A.

Can't remount /system in read-write mode.

Yes, my phone is a chinese Hero H2000+.
I have managed to stick su and busybox into /system/bin using debugfs, but there's absolutely no way I could find to make /system get into read-write mode.
If I type "mount -o rw,remount /system" it seems to work for about 1 second, but then it's remounted read-only. All the changes will be reverted (files I add/remove via script). If I try to run the same command again, it will show me a message saying filesystem is read only.
Does anyone know what might be causing this?
Thanks in advance.

[GUIDE] Enable/Disable HTC Virtual CDROM

I personally hate the automounting CDROM image with HTC software. I know it's fairly common knowledge how to disable it but below are the commands for anyone that cares. Make sure android debugging is enabled and enter the applicable command in your computer's terminal. As with other /system edits, this will only stick if you have S-OFF. You may need your phone screen unlocked to accept the su prompt if you haven't already granted ADB root access.
Disable HTC Virtual CDROM:
Code:
adb shell su root -c "mount -o remount,rw /system /system; mv /system/etc/CDROM.ISO /system/etc/CDROM.ISO.bak; mount -o remount,ro /system /system"
Re-Enable HTC Virtual CDROM:
Code:
adb shell su root -c "mount -o remount,rw /system /system; mv /system/etc/CDROM.ISO.bak /system/etc/CDROM.ISO; mount -o remount,ro /system /system"
i didnt know
I didn't know either... thanks!:good:
Never even crossed my ind to remove that annoying "feature"
Cheers man
Any particular reason to not simply rename the file cdrom. iso.bak or just delete it?
Transmitted from the holodeck of my HTC One M8.
hgoldner said:
Any particular reason to not simply rename the file cdrom. iso.bak or just delete it?
Transmitted from the holodeck of my HTC One M8.
Click to expand...
Click to collapse
Nope, I'm in IT so I always rename and not delete for small files. Personal preference.
I had no idea. Thanks so much
Nice. So glad to get rid of that stupid thing. I wanted to do that before but couldn't find where the file was located. Worked great. Thanks alot!
Thanks, just used root explore, found the file, and just added .bak to it.
Put a bootable Linux rescue ISO in there :angel:
unfortunately, I can't find that file. it exist because the silly CD popups every time I plug my phone in, but the .iso isn't in system/etc. my phone seems to be slightly stupid when doing a search. Oh well. Good info to have. Thanks for posting the instructions. I appreciate it.

Categories

Resources