need write to /system or something EXEC path - myTouch 3G Slide General

I was the first person I know on the internet to compile nmap for android and this guy ( http://wjholden.com/nmap/ ) took it to the next level got a new phone ( CM6 with OC ) nbow it does not work
* can't write to /system even with rw remount
* if I boot recovery I can' write to /systm but its just a temp fs so failsause ...
* can't ADB shell (read below ) to find out where system is really mounted OR mount the real /system my self ..
* remouted / but anything I add gets wipped on reboot ...
* onlything that works is remount / , copy nmap and then add PATH hackery to EXEC nmap ... on EVERY reboot ...
NOTES BELOW:
Code:
http://forum.xda-developers.com/showthread.php?t=701589&page=4
I think its because /system is protected in CM5+ ? even with remount
command... ?
let me know what I need to copy where in recovery mode to /system to
get yours to run properly :/
you could also have your installer check for this and have notes etc ..
# uname -a
Linux localhost 2.6.29.6-cyanogenmod #1 PREEMPT Fri Sep 17 16:05:39
PDT 2010 arm v6l GNU/Linux
# ls
ls
NMAP FOR ANDROID CROSS COMPILE ARM.html
NMAP.zip
nmap
nmap-4.01-1.spec
nmap-mac-prefixes
nmap-os-fingerprints
nmap-protocols
nmap-rpc
nmap-service-probes
nmap-services
# cp * /system/bin
cp * /system/bin
cp: can't create '/system/bin/NMAP FOR ANDROID CROSS COMPILE ARM.html': Out of m
emory
cp: can't create '/system/bin/NMAP.zip': Out of memory
cp: can't create '/system/bin/nmap': Out of memory
cp: can't create '/system/bin/nmap-4.01-1.spec': Out of memory
cp: can't create '/system/bin/nmap-mac-prefixes': Out of memory
cp: can't create '/system/bin/nmap-os-fingerprints': Out of memory
cp: can't create '/system/bin/nmap-protocols': Out of memory
cp: can't create '/system/bin/nmap-rpc': Out of memory
cp: can't create '/system/bin/nmap-service-probes': Out of memory
cp: can't create '/system/bin/nmap-services': Out of memory
# df /system
df /system
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/block/mtdblock3 245760 240824 4936 98% /system
# mount
mount
...
/dev/block/mtdblock3 on /system type yaffs2 (rw)
Code:
mount -o rw,remount -t yaffs2 /
rm -Rf /nmap
mkdir /nmap
echo 'export PATH=$PATH:/nmap' > path
cd /nmap
wget http://rmccurdy.com/stuff/G1/BINS/NMAP/NMAP.zip
unzip NMAP.zip
chmod 777 /nmap/*
export PATH=$PATH:/nmap
echo run /nmap/path before you start nmap
nmap -vvv 127.0.0.1
rmccurdy.com/nmap.sh (tested on CM6 / mytouch slide )
in normal mode ..
Code:
bash
localhost / # mount -o rw,remount -t yaffs2 /system
mount -o rw,remount -t yaffs2 /system
localhost / # cd /system
cd /system
localhost system # for i in `ls` ;do mkdir $i\\nmap ;done
for i in `ls` ;do mkdir $i\\nmap ;done
mkdir: can't create directory 'app\nmap': Out of memory
mkdir: can't create directory 'bin\nmap': Out of memory
mkdir: can't create directory 'build.prop\nmap': Out of memory
mkdir: can't create directory 'etc\nmap': Out of memory
mkdir: can't create directory 'fonts\nmap': Out of memory
mkdir: can't create directory 'framework\nmap': Out of memory
mkdir: can't create directory 'lib\nmap': Out of memory
mkdir: can't create directory 'lost+found\nmap': Out of memory
mkdir: can't create directory 'media\nmap': Out of memory
mkdir: can't create directory 'usr\nmap': Out of memory
mkdir: can't create directory 'xbin\nmap': Out of memory
in "Android system recovery (2e)" :
( note: /system is also a vfs I think .. I adb push to it and reboot and the file is gone ... )
Code:
C:\Documents and Settings\Administrator\nmap>adb shell
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\Documents and Settings\Administrator\nmap>

You can't write in /system in normal boot mode as security is on (s-on), remounting rw does you no good.
In recovery you will need to mount /system from clockwork before you can do anything.

I do have Clockwork Recovery 2.5.0.1 but I am not sure how to get to a shell and or find /system mount path as I can't adb shell ( read above ) so I can't remount or mount /system
rmccurdy.com/nmap.sh * this is what I am using for nmap as of now ..
Usage:
bash -x /sdcard/nmap.sh localhost
etc ...

There's an option in clockwork under partitions to allow you to mount the system. I'm not sure why but a lot of people have an issue getting into su with adb when they are in recovery, the constant /system/bin/sh error is annoying. Also, if I remember right, yaffs2 is not what you use to mount the system when using that command. It's mtdblock3 or something like that if I'm thinking along the correct lines here.
Maybe you should try putting it in a zip file as a script and running it that way since you use a different command (and much easier) to mount the system and write to it. Then again, I'm not sure what you're trying to so so I could just be talking out of my a$$

I can't do anything usefull in recovery ... reboot and apply update.zip but I dont how how nor do I really want to make a .zip / script to mount system etc .. do you know a zip I can work from as an example

rmccurdy said:
I can't do anything usefull in recovery ... reboot and apply update.zip but I dont how how nor do I really want to make a .zip / script to mount system etc .. do you know a zip I can work from as an example
Click to expand...
Click to collapse
The slide doesn't have S-Off, most HTC phones have them now...So you have to wait for Alpharev 2.0 to be released.

Ace42 said:
The slide doesn't have S-Off, most HTC phones have them now...So you have to wait for Alpharev 2.0 to be released.
Click to expand...
Click to collapse
Yes, but in recovery we can mount the system and write to it. Phones with s-off can do that while booted normally because the NAND is unlocked and the system is no longer protected.
You can do it one of two ways. This one is easiest if you know linux commands but are unfamiliar with update-script format. Make an update script and put this in there:
Code:
show_progress 0.5 0
run_program PACKAGE:example.sh
show_progress 0.5 10
You don't have to use the show_progress line, it's just for aesthetics.
Make a .sh script, name it whatever you want and put the linux commands you want to execute in the script. For example:
Code:
#!/sbin/sh
#
##############################################
mount /system;
rm -rf /nmap
mkdir /nmap
echo 'export PATH=$PATH:/nmap' > path
cd /nmap
wget http://rmccurdy.com/stuff/G1/BINS/NMAP/NMAP.zip
unzip NMAP.zip
chmod 777 /nmap/*
export PATH=$PATH:/nmap
echo run /nmap/path before you start nmap
nmap -vvv 127.0.0.1
exit 0;
Or what ever you're trying to get done. I'll upload an example file of all this since hands on is always better. Looking at this though, you may want to have the files in the zip (in the directories they will be installed to) because wget probably wont work since the radio is off while in recovery.

interesting thanks ! ... do you have to resign it and all or can you just edit and rezip it ?

rmccurdy said:
interesting thanks ! ... do you have to resign it and all or can you just edit and rezip it ?
Click to expand...
Click to collapse
As long as you're using clockwork you just edit and zip. Might be easier to use an archive explorer to open (without uzipping it) then drag and drop, but do what's easiest for you.

Related

cp: write error: no space left on device in system

I have been having this error message come up using the terminal. I was attempting to add the volume enhancements via Lucid's script on the hybrid JF 1.51 with the HTC apps. I have asked Lucid if he knew how to solve this, but i wanted to see if anyone else might know the solution. I have been searching on here and also on google and yahoo but I have yet to find anything. I even took out my sd card to see if that would help after restarting my phone but nothing. Did i just screw myself?
innerlight said:
I have been having this error message come up using the terminal. I was attempting to add the volume enhancements via Lucid's script on the hybrid JF 1.51 with the HTC apps. I have asked Lucid if he knew how to solve this, but i wanted to see if anyone else might know the solution. I have been searching on here and also on google and yahoo but I have yet to find anything. I even took out my sd card to see if that would help after restarting my phone but nothing. Did i just screw myself?
Click to expand...
Click to collapse
i'm not privvy to lucid's script, but..
remount /system rewrite
do a cp -f to the files you are replacing
remount /system read-only
if you still get no space left, reboot your phone, then try again.
pershoot said:
i'm not privvy to lucid's script, but..
remount /system rewrite
do a cp -f to the files you are replacing
remount /system read-only
if you still get no space left, reboot your phone, then try again.
Click to expand...
Click to collapse
forgive my ignorance but do I type this in terminal as is? Because when I do that it cannot find remount.
I think I found the problem as to why I saw that error. I went from JFs-1.51 US built to the hybrid one that cyanogen did (the JF-1.51 + HTC apps) and I think there maybe something wrong inside there. First wiped and flashed JF's one and then wiped and flashed the cyanogen one and the problem is there.
innerlight said:
forgive my ignorance but do I type this in terminal as is? Because when I do that it cannot find remount.
Click to expand...
Click to collapse
copy the three files needed for the volume increase (2 if your on JF (AudioFilter and AudioPara4)) on to the sdcard in to lets say a directory named 'audio'. make sure you have unmounted the sdcard from within your OS after you have completed the copy, and have unplugged the USB cable.
open up terminal (on your phone)
$ su
# mount -o rw,remount /dev/block/mtdblock3 /system
# cd /sdcard/audio
# mkdir BK
# cp -p /system/etc/Audio* ./BK
# cp -f AudioFilter.csv /system/etc
# cp -f AudioPara4.csv /system/etc
# cp -f AudioPara_TMUS.csv /system/etc
# mount -o ro,remount /dev/block/mtdblock3 /system
# exit
$ exit
bounce your phone.
pershoot said:
copy the three files needed for the volume increase (2 if your on JF (AudioFilter and AudioPara4)) on to the sdcard in to lets say a directory named 'audio'. make sure you have unmounted the sdcard from within your OS after you have completed the copy, and have unplugged the USB cable.
open up terminal (on your phone)
$ su
# mount -o rw,remount /dev/block/mtdblock3 /system
# cd /sdcard/audio
# mkdir BK
# cp -p /system/etc/Audio* ./BK
# cp -f AudioFilter.csv /system/etc
# cp -f AudioPara4.csv /system/etc
# cp -f AudioPara_TMUS.csv /system/etc
# mount -o ro,remount /dev/block/mtdblock3 /system
# exit
$ exit
bounce your phone.
Click to expand...
Click to collapse
Thanks for the reply. I am still getting the same error with the JF-1.51+HTC apps build. I told Cyanogen about it and hopefully he will get it sorted out because his built is faster than the regular JF build. I guess I have to decide if the added HTC apps are worth more than the sound increase.

[Android Tutorials] Getting Started, ADB, Tethering, Building system images etc...

I figured I would start a tutorial thread. If you have some tutorials or instructions you would like to share then post them. Also post links to other helpful posts and threads.
Basic instructions for building an android squashfs system image:
First you need a Linux installation. I use Ubuntu 9.04 and run as the root user.
You need to have squashfs-utils installed. I have version 3.3 installed.
You need the android version of genext2fs. You might want to chmod this to executable before using it.
Starting simple download the ion 1.5 build or any other build that works on vogue as a base.
If the base image your using is a system.img then it's cramfs. You can mount this image and pull from it. Enter android-builds directory and create a tmp directory for mounting the image and a mount point in that tmp dir.
Code:
mkdir tmp
mkdir tmp/cram-sys
mount -o loop system.img tmp/cram-sys
The system.img should be mounted on tmp/cram-sys
Now you have a base system image to grab files from.
If you have a system.sqsh then it is a little easier to do.
Put the system.sqsh in a working directory like base-rom in your android-builds directory and while in the directory from a terminal execute:
Code:
unsquashfs system.sqsh
This will create a directory called squashfs-root.
Then download a build from the dream forums on xda.
Usually they come in update.zip format. Extract the zip to a working directory like android-builds/foo
Inside you should see some directories mainly data and system is what you are after.
Look inside the data folder for any app or app_s directories. Copy those apps to the system/app directory. Leave out any unnecessary apps like wifi tether and so on.
In the system directory is another directory called lib. You need to take out libaudio.so libaudioflinger.so libgps.so. Depending upon the build the vogue specific libraries are either in /lib or /lib/donut in the rootfs. We take these out of system/lib because they cause conflicts. Another way around this is to copy the vogue specific libraries to system/lib.
In the system directory is another directory called etc. You need to replace apns.conf with the one from a working vogue android build.
Depending on the build you are porting you will need to modify system/bin and system/xbin. I usually add any missing files to the new image and base the missing files off of the ones in the android 1.5 ion build.
After this you need to edit your build.prop in the system directory. Look at the ion cupcake 1.5 or a donut build with market fix for reference depending on the build you are porting.
The last step is to put a .build file in the system directory. This depends on the build type.
donut.build
ion.build
rogers.build
hero.build
After you've modified the system directory you need to use genext2fs to create an android specific ext2 image.
for cupcake/donut images
Code:
genext2fs -d ./system -b 80000 -a system.ext2
this will make ~80mb ext2 system image.
for hero/sense ui builds a larger image is required
Code:
genext2fs -d ./system -b 160000 -a system.ext2
This system.ext2 is now bootable and you should be able to copy it to your sdcard and run it.
To turn this into a system.sqsh you need to mount it
Code:
mkdir tmp/system-ext2-mnt
mount -o loop system.ext2 tmp/system-ext2-mnt
Then make a squashfs image of the mounted directory
Code:
mksquashfs tmp/system-ext2-mnt/ system.sqsh
Build scripts/environment from loserskater:
http://forum.xda-developers.com/showthread.php?t=585452
ADB setup and Telenet via adb:
enatefox's tutorial for setting up adb and udev
enatefox's tutorial for telenet via adb
Adding a hosts file to block adds
Download this hosts file and copy it to /etc/hosts this should block most adds while browsing in android. Saving you time and bandwidth.
Using google dns servers on your phone:
(mssmision)
connect to the adb shell or from the terminal with su in android type
setprop ro.kernel.android.ndns 2
setprop net.eth0.dns1 8.8.8.8
setprop net.eth0.dns2 8.8.4.4
Basic Theming:
http://forum.xda-developers.com/showpost.php?p=3175504&postcount=1
Tethering via tetherbot and adb.
Download and install adb on your computer.
Download tetherbot and install it in android.
Connect your phone to your computer
Open tetherbot on your phone and push "Start Socks"
Open a terminal on your computer and type
Code:
adb forward tcp:1080 tcp:1080
Open firefox on your computer and type
Code:
about:config
search in the filter for
Code:
network.proxy.socks_remote_dns
change the value from true to false
Go into your network preferences settings in firefox and select manual proxy configuration
In the SOCKS host field enter localhost and TCP port 1080
Select SOCKS_v5
Click OK
Reload firefox and you should be running off your phones data network.
thank you Zen will give it a blast
oooh yeah runs faster!!!
smarty lol do you still need to keep sd card in slot after flashing?
# mkdir /mnt
# mkdir /mnt/rootfs-sd
# mkdir /mnt/rootfs-nand
# mkdir /mnt/system-sd
# mkdir /mnt/system-nand
# mkdir /mnt/data
# mkdir /mnt/sdcard
# flash_eraseall /dev/mtd/mtd1
Erasing 128 Kibyte @ d80000 -- 100 % complete.
# flash_eraseall /dev/mtd/mtd2
Erasing 128 Kibyte @ 1a20000 -- 29 % complete.
Skipping bad block at 0x01a40000
Erasing 128 Kibyte @ 5980000 -- 100 % complete.
# flash_eraseall /dev/mtd/mtd3
Erasing 128 Kibyte @ 75e0000 -- 92 % complete.
Skipping bad block at 0x07600000
Erasing 128 Kibyte @ 8000000 -- 100 % complete.
are the bad blocks there normal?
ali3nfr3ak said:
# mkdir /mnt
# mkdir /mnt/rootfs-sd
# mkdir /mnt/rootfs-nand
# mkdir /mnt/system-sd
# mkdir /mnt/system-nand
# mkdir /mnt/data
# mkdir /mnt/sdcard
# flash_eraseall /dev/mtd/mtd1
Erasing 128 Kibyte @ d80000 -- 100 % complete.
# flash_eraseall /dev/mtd/mtd2
Erasing 128 Kibyte @ 1a20000 -- 29 % complete.
Skipping bad block at 0x01a40000
Erasing 128 Kibyte @ 5980000 -- 100 % complete.
# flash_eraseall /dev/mtd/mtd3
Erasing 128 Kibyte @ 75e0000 -- 92 % complete.
Skipping bad block at 0x07600000
Erasing 128 Kibyte @ 8000000 -- 100 % complete.
are the bad blocks there normal?
Click to expand...
Click to collapse
yea thats normal
here is what i did to get it working
1. unsquashfs the system.sqsh
2. move apps folder to desktop
3. then mksquashfs system.sqsh
4. in terminal do(make sure no data.img on desktop)
Code:
dd if=/dev/zero of=./desktop/data.img bs=1048576 count=128
mke2fs -F ./desktop/data.img
sudo mkdir /mnt/data
sudo mount -o loop ./desktop/data.img /mnt/data
sudo mv ./desktop/app /mnt/data/app_s
sudo umount /mnt/data
then copy the data.img and system.sqsh to sdcard
and then make
datafstonand
and
systemfstonand
then right after it starts to boot
A N D R I O D
enabled adb bla bla
then do
adb shell stop
then
ln -s /data/app_s /system/app
then
adb shell start
you should be good if you followed this to the T
jamezelle said:
yea thats normal
here is what i did to get it working
1. unsquashfs the system.sqsh
2. move apps folder to desktop
3. then mksquashfs system.sqsh
4. in terminal do(make sure no data.img on desktop)
Code:
dd if=/dev/zero of=./desktop/data.img bs=1048576 count=128
mke2fs -F ./desktop/data.img
sudo mkdir /mnt/data
sudo mount -o loop ./desktop/data.img /mnt/data
sudo mv ./desktop/app /mnt/data/app_s
sudo umount /mnt/data
then copy the data.img and system.sqsh to sdcard
and then make
datafstonand
and
systemfstonand
then right after it starts to boot
A N D R I O D
enabled adb bla bla
then do
adb shell stop
then
ln -s /data/app_s /system/app
then
adb shell start
you should be good if you followed this to the T
Click to expand...
Click to collapse
you should put the symlink in the system folder before you squash it that way it should boot straight through.
ali3nfr3ak said:
smarty lol do you still need to keep sd card in slot after flashing?
Click to expand...
Click to collapse
if you edit init and put cache in /data you should be able to fully run from nand.
or from adb shell
Code:
cd /
umount /cache
mkdir /data/cache
mount /cache /data/cache
pull your sdcard. look ma running from nand.
zenulator said:
you should put the symlink in the system folder before you squash it that way it should boot straight through.
Click to expand...
Click to collapse
one problem i have is i dont think compcache is being enabled, becaulse im getting home reloads every(yes everytime i hit home(hold cam/redbutton))
can i just add the commands from my hero.user.conf to init or init.hero.rc, or will they not be called right?
jamezelle said:
one problem i have is i dont think compcache is being enabled, becaulse im getting home reloads every(yes everytime i hit home(hold cam/redbutton))
can i just add the commands from my hero.user.conf to init or init.hero.rc, or will they not be called right?
Click to expand...
Click to collapse
when i ran the tattoo build from nand compcache was enabled. make sure you have the config files in your android directory on your sdcard. to check if you have swap enabled go into the terminal or adb shell and type
Code:
free
and see how much ram/swap you have.
also i think
Code:
cat /proc/swaps
will show you what swap is being used.
Zen can u tell me what all the files i need on my sdcard to get this going, i tried for a couple of hours last night to get this going no luck tho, and jamezelle helped me out as well still no luck tho, all i had was on my sdcard was android folder with dzos rootfs.img, system-noapps.sqsh, VOGUIMG.nbh as i flashed from sdcard and app_s.tar.gz
[email protected]:~# adb shell
# mkdir /mnt
# mkdir /mnt/rootfs-sd
# mkdir /mnt/rootfs-nand
# mkdir /mnt/system-sd
# mkdir /mnt/system-nand
# mkdir /mnt/data
# mkdir /mnt/sdcard
# flash_eraseall /dev/mtd/mtd1
Erasing 128 Kibyte @ d80000 -- 100 % complete.
# flash_eraseall /dev/mtd/mtd2
Erasing 128 Kibyte @ 1a20000 -- 29 % complete.
Skipping bad block at 0x01a40000
Erasing 128 Kibyte @ 5980000 -- 100 % complete.
# erase_eraseall /dev/mtd/mtd3
/system/bin/sh: erase_eraseall: not found
# flash_eraseall /dev/mtd/mtd3
Erasing 128 Kibyte @ 75e0000 -- 92 % complete.
Skipping bad block at 0x07600000
Erasing 128 Kibyte @ 8000000 -- 100 % complete.
# mount -t vfat /dev/block/mmcblk0p1 /mnt/sdcard/
# losetup /dev/block/loop1 /mnt/sdcard/android/rootfs.img
# mount /dev/block/loop1 /mnt/rootfs-sd
# mount /dev/block/mtd1 /mnt/rootfs-nand/
mount: mounting /dev/block/mtd1 on /mnt/rootfs-nand/ failed: No such file or directory
i cannot get past this part, Do i need more files on sdcard to get going?
ali3nfr3ak said:
Zen can u tell me what all the files i need on my sdcard to get this going, i tried for a couple of hours last night to get this going no luck tho, and jamezelle helped me out as well still no luck tho, all i had was on my sdcard was android folder with dzos rootfs.img, system-noapps.sqsh, VOGUIMG.nbh as i flashed from sdcard and app_s.tar.gz
[email protected]:~# adb shell
# mkdir /mnt
# mkdir /mnt/rootfs-sd
# mkdir /mnt/rootfs-nand
# mkdir /mnt/system-sd
# mkdir /mnt/system-nand
# mkdir /mnt/data
# mkdir /mnt/sdcard
# flash_eraseall /dev/mtd/mtd1
Erasing 128 Kibyte @ d80000 -- 100 % complete.
# flash_eraseall /dev/mtd/mtd2
Erasing 128 Kibyte @ 1a20000 -- 29 % complete.
Skipping bad block at 0x01a40000
Erasing 128 Kibyte @ 5980000 -- 100 % complete.
# erase_eraseall /dev/mtd/mtd3
/system/bin/sh: erase_eraseall: not found
# flash_eraseall /dev/mtd/mtd3
Erasing 128 Kibyte @ 75e0000 -- 92 % complete.
Skipping bad block at 0x07600000
Erasing 128 Kibyte @ 8000000 -- 100 % complete.
# mount -t vfat /dev/block/mmcblk0p1 /mnt/sdcard/
# losetup /dev/block/loop1 /mnt/sdcard/android/rootfs.img
# mount /dev/block/loop1 /mnt/rootfs-sd
# mount /dev/block/mtd1 /mnt/rootfs-nand/
mount: mounting /dev/block/mtd1 on /mnt/rootfs-nand/ failed: No such file or directory
i cannot get past this part, Do i need more files on sdcard to get going?
Click to expand...
Click to collapse
well the last command you typed should be
Code:
mount -t yaffs2 /dev/block/mtdblock1 /mnt/rootfs-nand
also i updated the tutorial to reflect that and also a simplified version along the lines of jamezelle's method of that uses dzo's normal installer so you shouldn't have to type all those commands just use the blank files in the rootfs and make sure you have the rest in /andoroid on your sdcard.
Not sure if you've seen the thread I started on the Kaiser forums. It's really easy to run scripts that I made for building systems.
Check it out
loserskater said:
Not sure if you've seen the thread I started on the Kaiser forums. It's really easy to run scripts that I made for building systems.
Check it out
Click to expand...
Click to collapse
I added a link in the first post. great work.
Installing adb drivers on Windows [Vista,7] x64
NOTE: You don't need to disable driver signing to install! The appropriate .cat files are included in the download.
//Prep
1. Download adb2 posted by dzo. It's on the sourceforge site:
adb2
2. Unpack the zip.
3. In android, go to settings - applications - development and make sure usb debugging is selected.
//Cleanup
4. Open device manager (start - run - devmgmt.msc)
5. Plug in your phone and _watch_ for something new to show up. Might be 'Android Phone.'
6. Confirm that the new device is your phone by unplugging. The device should disappear.
7. Plug back in.
8. Right click on the device and choose 'Uninstall'
9. Check the 'delete this driver from my computer' box.
10. click ok. NOTE: It may take a loong time. Wait.
11. Unplug your phone.
12. If prompted to reboot, do so.
13. Uninstall WMDC (Windows Mobile Device Center)
14. Reboot.
//Install
15. Re-download and reinstall WMDC
16. Plug in your phone.
17. The device driver installation wizard should fail. IF IT INSTALLS THE DEVICE, go back to cleanup.
18. Open device manager.
19. Right click on 'Android Phone' and choose 'update driver.'
20. Click 'Browse my computer for driver software.'
21. Click 'let me pick'
22. Click 'next'
23. Click 'have disk'
24. Click 'browse'
25. Browse to the location where you unzipped adb2.
26. Open the Vista_x64 directory.
27. Choose androidusb.inf
28. Click ok
29. Choose 'HTC, Corporation' as the manufacturer (may not see this)
30. Choose 'My HTC' as the model
31. Click 'next'
32. Click 'yes'
DONE!
Zen, I know we were talking yesterday. Do you think you can outline in detail how to convert an EXT2 or NAND or SD Card based installed system on the vogue into something we can distribute?
I'd really like to share my customized rom with people.
Thanks again for all of your contributions
Ok finally got tattoo booting was having wakeup problems but made system .ext2 then sqsh. But audio still not playing, any ideas? Thanx I did use audio libs from donut rootfs
i thought the libs had to come from an ION build?

Need help with apps2sd on milestone

I found a guide to aply apps to sd on my milestone. I got it working, but the problem is, that apps installed in the data/app-private folder doesn't show as installed. I can see that they are placed in ext2 partion on my sd card along with the other apps, that normaly installes in data/app.Here is the guide i used
After creatting a ext2 partition on my SD card, i copied ext2. To sd card along with
mot_boot_mode script
#!/system/bin/sh
export PATH=/system/bin:$PATH
mot_boot_mode.bin
insmod /data/ext2.ko
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
Then in recovery mode i entered
adb shell
su
cp /sdcard/ext2.ko /data/ext2.ko
insmod /data/ext2.ko
mkdir /data/sdapp
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
cp /data/app/* /data/sdapp/
mkdir /sdcard/sicherung
cp /data/app/* /sdcard/sicherung
rm -r /data/app
umount /data/sdapp
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
ls /data/sdapp
ln -s /data/sdapp /data/app
chmod 644 /data/sdapp/*
/data/busybox/chown -h 1000:1000 /data/app
/data/busybox/chown 1000:1000 /data/sdapp/*
/data/busybox/chown 1000:1000 /data/sdapp
insmod /data/ext2.ko
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
mount -o remount,rw / /system
mv /system/bin/mot_boot_mode /system/bin/mot_boot_mode.bin
cp /sdcard/mot_boot_mode_script /system/bin/mot_boot_mode
chmod 755 /system/bin/mot_boot_mode
Do i need to make a symbolic link in data/app-private also?
I would realy like to get this working, because i purchased a lot of apps on the marked. But i have only half of them installed. It used to work on my HTC hero. But it was allready enabled in a custom rom. And that is not possible to do on a Milestone
Thanks
Fixed it by changing app-private folder two
hey glaus...
this almost seems like a guide, hehe...
i'm trying to get apps2sd to work on my milestone as well...
i tried booting in recovery mode and entering the chain of commands you just set out....
but when i go into recovery mode, i see the reboot system option, apply sdcard:update.zip, wipe data/factory reset and wipe cache partition....
and under it, i have e: can't open /cache/recovery/command
any ideas on how to fix this or where can i enter those commands you set out?
i tried in adb shell, but i get a /data/busybox/chown is not found error when setting the permissions...
thanks!
do
crap me too and it deleted some apps 2 i really want this been trying for a week oh i have a telus milestone and get the same above error.busybox is installed and hard drive is partioned
ah crap market is gone 2 lol gotta do a nano restore......man i want this bad i even bricked my phone and brought it back to life this week arghhhh
yeah...i don't know where claus is from...but if he has a telus milestone, he's the only one i've seen been able to install apps2sd with a telus milestone
i've seen other countries, even some with the same bands as we have, but none have had the actual "telus" one....the funny thing is that i can get everything else to work..
i have titanium backup pro, emulator, root explorer and everything is at superuser access...
if claus can help, i will bear his children
edit: how the heck do you install/activate the mot_boot_mode script? I see reference to it in a few wikis on basically that's what will allow us to use apps2sd...but I have no clue how to implement it
got app2sd working on milestone using a diff method will post soon
ok i got app2sd working on my telus milestone here is how i did it if u tried this method here ur gunna have to unroot then root or use a nano backup of freshly rooted phone busybox need mot to be installed so use titanium for back up and proceed http://forum.xda-developers.com/showthread.php?t=692367
ClausG76 said:
I found a guide to aply apps to sd on my milestone. I got it working, but the problem is, that apps installed in the data/app-private folder doesn't show as installed. I can see that they are placed in ext2 partion on my sd card along with the other apps, that normaly installes in data/app.Here is the guide i used
After creatting a ext2 partition on my SD card, i copied ext2. To sd card along with
mot_boot_mode script
#!/system/bin/sh
export PATH=/system/bin:$PATH
mot_boot_mode.bin
insmod /data/ext2.ko
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
Then in recovery mode i entered
adb shell
su
cp /sdcard/ext2.ko /data/ext2.ko
insmod /data/ext2.ko
mkdir /data/sdapp
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
cp /data/app/* /data/sdapp/
mkdir /sdcard/sicherung
cp /data/app/* /sdcard/sicherung
rm -r /data/app
umount /data/sdapp
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
ls /data/sdapp
ln -s /data/sdapp /data/app
chmod 644 /data/sdapp/*
/data/busybox/chown -h 1000:1000 /data/app
/data/busybox/chown 1000:1000 /data/sdapp/*
/data/busybox/chown 1000:1000 /data/sdapp
insmod /data/ext2.ko
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
mount -o remount,rw / /system
mv /system/bin/mot_boot_mode /system/bin/mot_boot_mode.bin
cp /sdcard/mot_boot_mode_script /system/bin/mot_boot_mode
chmod 755 /system/bin/mot_boot_mode
Do i need to make a symbolic link in data/app-private also?
I would realy like to get this working, because i purchased a lot of apps on the marked. But i have only half of them installed. It used to work on my HTC hero. But it was allready enabled in a custom rom. And that is not possible to do on a Milestone
Thanks
Click to expand...
Click to collapse
fixed http://forum.xda-developers.com/showthread.php?t=692367

[HOWTO] Loop mount

OK, I spent a couple of hours figuring out how loop mounting works. The problem is that the mount command in both toolbox and busybox supports only one loop device. I modified the toolbox version to allow the specification of a new loop device.
Here is how to make a 500mb loop-mounted ext2 system at /mnt/myloop , with the system being stored in /storage/sdcard/myext2system.img
Step 1. Make sure you have root. Download bettermount*.zip to your PC from here. Copy the "bettermount" file from the zip file to /data/local/ (or some other location). One way of doing that is with:
Code:
adb push bettermount /data/local
on the PC. Or you can mount your device to USB, copy bettermount to storage, and then in a root shell copy it to /data/local. Or if you have RW root, you can install bettermount in /bin or some other convenient location.
Start a shell on the device, either via adb or an on-device terminal (not recommended unless you have an external keyboard). Switch to root:
Code:
su
Then make bettermount executable:
Code:
chmod 755 /data/local/bettermount
The following steps assume you're still in your root shell.
Step 2. Create ext2 file system in a file. (Skip this if you already have one.)
Code:
dd if=/dev/zero of=/storage/sdcard/myext2system.img bs=1M count=500
mke2fs /storage/sdcard/myext2system.img
mke2fs will give you a warning that this isn't a block special device, but just press "y" and "enter".
Step 3. Create a loop device node for the ext2 file system. The problem here is that the OS uses loop device nodes for apps moved to external storage and one for the system squashfs, and it only has enough loop device nodes for those purposes--any loop device nodes in /dev/block are already in use. On the assumption that you aren't going to have more than 253 apps moved to storage, we're going to create a loop device node numbered 255. If you like, you can check that there isn't already one with that number with
Code:
ls /dev/block/loop*
So, let's create the loop device node:
Code:
mknod -m640 /dev/block/loop255 b 7 255
Step 4. Create a mount point:
Code:
mkdir /mnt/myloop
Step 5. Mount myext2filesystem.img:
Code:
/data/local/bettermount -t ext2 -orw,exec,noatime,nodiratime,sync,loop=/dev/block/loop255 /storage/sdcard/myext2system.img /mnt/myloop
Enjoy your new file system at /mnt/myloop !
You will have to repeat Steps 3-5 after every boot, or else you can make a script that runs every time you boot. You could simply put the commands for 3-5 into a Script Manager script set to run on boot, or there may be some better, more unixy way (but I haven't had any luck editing startup scripts).
What to do with your shiny new filesystem? Well, you could move not just apps but also their libraries to external storage (you can also do that by remounting your external storage in exec mode).
arpruss said:
OK, I spent a couple of hours figuring out how loop mounting works. The problem is that the mount command in both toolbox and busybox supports only one loop device. I modified the toolbox version to allow the specification of a new loop device.
Here is how to make a 500mb loop-mounted ext2 system at /mnt/myloop , with the system being stored in /storage/sdcard/myext2system.img
Step 1. Make sure you have root. Download bettermount*.zip to your PC from here. Copy the "bettermount" file from the zip file to /data/local/ (or some other location). One way of doing that is with:
Code:
adb push bettermount /data/local
on the PC. Or you can mount your device to USB, copy bettermount to storage, and then in a root shell copy it to /data/local. Or if you have RW root, you can install bettermount in /bin or some other convenient location.
Start a shell on the device, either via adb or an on-device terminal (not recommended unless you have an external keyboard). Switch to root:
Code:
su
Then make bettermount executable:
Code:
chmod 755 /data/local/bettermount
The following steps assume you're still in your root shell.
Step 2. Create ext2 file system in a file. (Skip this if you already have one.)
Code:
dd if=/dev/zero of=/storage/sdcard/myext2system.img bs=1M count=500
mke2fs /storage/sdcard/myext2system.img
mke2fs will give you a warning that this isn't a block special device, but just press "y" and "enter".
Step 3. Create a loop device node for the ext2 file system. The problem here is that the OS uses loop device nodes for apps moved to external storage and one for the system squashfs, and it only has enough loop device nodes for those purposes--any loop device nodes in /dev/block are already in use. On the assumption that you aren't going to have more than 253 apps moved to storage, we're going to create a loop device node numbered 255. If you like, you can check that there isn't already one with that number with
Code:
ls /dev/block/loop*
So, let's create the loop device node:
Code:
mknod -m640 /dev/block/loop255 b 7 255
Step 4. Create a mount point:
Code:
mkdir /mnt/myloop
Step 5. Mount myext2filesystem.img:
Code:
/data/local/bettermount -t ext2 -orw,exec,noatime,nodiratime,sync,loop=/dev/block/loop255 /storage/sdcard/myext2filesystem.img /mnt/myloop
Enjoy your new file system at /mnt/myloop !
You will have to repeat Steps 3-5 after every boot, or else you can make a script that runs every time you boot. You could simply put the commands for 3-5 into a Script Manager script set to run on boot, or there may be some better, more unixy way (but I haven't had any luck editing startup scripts).
What to do with your shiny new filesystem? Well, you could move not just apps but also their libraries to external storage (you can also do that by remounting your external storage in exec mode).
Click to expand...
Click to collapse
Which version of busybox were you testing with? I haven't had a problem with multiple loop devices...
I've been using the stock busybox: 1.7.2.
Do you use -oloop=/dev/block/loopNN to specify the device?
I just tried 1.16.0 from the Titanium Backup website. No luck. I created /dev/block/loop222. Then:
Code:
# /tmp/busybox mount -t ext2 -oloop=/dev/block/loop222 /storage/10.img /mnt/myloop
mount: can't setup loop device: No such file or directory
# bettermount -t ext2 -oloop=/dev/block/loop222 /storage/10.img /mnt/myloop
# (works!)
I also tried just plain -oloop, without the =/dev/block/loop222, and it didn't work.
arpruss said:
I've been using the stock busybox: 1.7.2.
Do you use -oloop=/dev/block/loopNN to specify the device?
I just tried 1.16.0 from the Titanium Backup website. No luck. I created /dev/block/loop222. Then:
Code:
# /tmp/busybox mount -t ext2 -oloop=/dev/block/loop222 /storage/10.img /mnt/myloop
mount: can't setup loop device: No such file or directory
# bettermount -t ext2 -oloop=/dev/block/loop222 /storage/10.img /mnt/myloop
# (works!)
I also tried just plain -oloop, without the =/dev/block/loop222, and it didn't work.
Click to expand...
Click to collapse
I can't remember if mount was symlinked to busybox at the time, but I just used the standard "mount -o loop disk1.img /mnt/disk". I may have even been on a custom kernel and had a crosscompiled mount, so good work, this is probably going to be a common problem for people.
The problem with busybox seems to be that it thinks /dev/block/loop0 is free, but it's not. Doing losetup -f returns /dev/block/loop0.
If you could mount the loopdevice in init.rc this would be the easiest way to expand the 300MB /data problem with archos.
Also it might be the best way in CM7 until its stable for the persistent Data between revisions.
fzelle said:
If you could mount the loopdevice in init.rc this would be the easiest way to expand the 300MB /data problem with archos.
Also it might be the best way in CM7 until its stable for the persistent Data between revisions.
Click to expand...
Click to collapse
I have had no luck adding anything to init.rc with the rw root.
Moreover, /storage and /storage/sdcard get mounted quite late in the boot process--late enough that I think one can't just move the /data directory there. I suppose one might be able to mount them earlier in the process, but I haven't been able to figure out how to run anything in an init script. If anybody knows how to do it, please speak up!
What one could do, however, is mount the loop from an app's on-boot notification, and then symlink individual app files.
It looks like with a better busybox than the one included with the device, one can also use losetup to specify the loop device--see here.
I built a full 1.18.5 version of Busybox, and it does loop mounting just right. You can replace Step 1 of my HOWTO with fetching my modified busybox and putting it in /data/local, from http://code.google.com/p/busybox-for-android/downloads/list
Then step 3 is not needed.
Step 4 should be replaceable with the very simple:
Code:
/data/local/busybox mount -orw,exec,noatime,nodiratime,sync,loop /storage/sdcard/myext2system.img /mnt/myloop
Or if you're pressed for time, and want to use default mount options:
Code:
/data/local/busybox mount -oloop /storage/sdcard/myext2system.img /mnt/myloop
But if you want to implement this is inside an app, depending on your license needs, you may want to use the longer method, since busybox is GPL while bettermount is Apache 2.

Unable to mount System as rw in 7.1.1 DP

I am trying to create an overlay folder under /system/vendor so that I can throw a layers apk there to hide the nav bar. I am currently using the build.prop method which doesn't work nicely with the Now on Tap action of Swipe Navigation which is what I am ultimately trying to fix.
I tried using Solid Explorer to simply create the new directory like I did previously in 7.0 and 6.x but was unable to do so (action failed). I decided to try using the terminal and create the folder and move files from there but got the message that the system was read-only. I then attempted to mount system a few different ways all of which failed. I did use su before entering these commands.
Code:
angler:/system/vendor $ mkdir overlay
mkdir: 'overlay': Read-only file system
angler:/system/vendor $ mount -o rw,remount,rw /system
mount: '/dev/block/platform/soc.0/f9824900.sdhci/by-name/system' not user mountable in fstab
angler:/system/vendor $ /system/bin/mount -o rw,remount,rw /system /system
mount: '/system' not in /proc/mounts
angler:/system/vendor $ /system/bin/mount /system
mount: bad /etc/fstab: No such file or directory
Googling around didn't yield much in the way of solutions other than these different methods of mounting system. Am I just unable to mount system as rw in 7.1.1 currently, and if so, is there another way to accomplish what I want?
I'm trying to find thread I read this from, so if I find it I'll post link to it. When I was on early 7 previews that was set up with systemless root I went into twrp and then went to terminal and typed the following, touch su. When your in terminal cd to both bin and xbin and type command "touch su" without quotes. Then reboot and you should be able to use something like es file explorer to get into and write in /system. Hope that helps.
Found it, look to post = 15
http://forum.xda-developers.com/nexus-6p/help/es-file-explorer-doesnt-understand-t3242775
Unfortunately that did not end up working for me, thanks for looking up the link for me though!
On Nougat the rw mount command should be typed like this:
mount -o rw,remount /system
then for touch:
touch sbin/su
Thank you blitz for clarifying.
Hmm... it seems like the mount worked but the touch did not. I ended up using just "touch su" but ran into a different error with mkdir. I think I may just be out of luck for now. Thank you both for your help!
Code:
~ # mount -o rw,remount /system
~ # cd /system/bin
/system/bin # touch sbin/su
touch: sbin/su: No such file or directory
/system/bin # touch su
/system/bin # cd /system/xbin
/system/xbin # touch su
/system/xbin # cd /system/vendor
/vendor # mkdir overlay
mkdir: cannot create directory 'overlay': No space left on device
AbuShabanov said:
Hmm... it seems like the mount worked but the touch did not. I ended up using just "touch su" but ran into a different error with mkdir. I think I may just be out of luck for now. Thank you both for your help!
Code:
~ # mount -o rw,remount /system
~ # cd /system/bin
/system/bin # touch sbin/su
touch: sbin/su: No such file or directory
/system/bin # touch su
/system/bin # cd /system/xbin
/system/xbin # touch su
/system/xbin # cd /system/vendor
/vendor # mkdir overlay
mkdir: cannot create directory 'overlay': No space left on device
Click to expand...
Click to collapse
I'm not sure what you're trying to accomplish but still:
The touch sbin/su means creating an empty file called su in the sbin subdirectory under the current directory. So if there is no subdir named sbin under /system/bin, then it's not going to work
Secondly, you should know about the ls command: ls -la lists the files in the current directory, and remember than in unix and linux terminology, a directory is also a file so you'll also see directories (including current "." and parent "..")
Third, you should know about the df command which shows filesystem disk space usage. df -h will show you how much free space you have an all of your filesystems, including system.
Last, with great power comes great responsibilities. Running the wrong command as root will easily make your system unusable.
I have substratum installed and inside /system/vendor there is a link (again a file) called overlay which links to directory /system/overlay where apks are.
rchtk said:
I'm not sure what you're trying to accomplish
Click to expand...
Click to collapse
I am trying to create an overlay folder under /system/vendor so that I can throw a layers apk there to hide the nav bar.
rchtk said:
I have substratum installed and inside /system/vendor there is a link (again a file) called overlay which links to directory /system/overlay where apks are.
Click to expand...
Click to collapse
Are you on the 7.1.1 (NPF10C)? If so it sounds like you have accomplished what I am trying to do. I'm only familiar with the basic unix commands as I haven't actively used it in about 5 years. Would you mind sharing how to create the link to /system/overlay from /system/vendor, or does Substratum take care of that? Offhand it sounds like a symbolic link but my terminology is pretty rusty.
AbuShabanov said:
I am trying to create an overlay folder under /system/vendor so that I can throw a layers apk there to hide the nav bar.
Are you on the 7.1.1 (NPF10C)? If so it sounds like you have accomplished what I am trying to do. I'm only familiar with the basic unix commands as I haven't actively used it in about 5 years. Would you mind sharing how to create the link to /system/overlay from /system/vendor, or does Substratum take care of that? Offhand it sounds like a symbolic link but my terminology is pretty rusty.
Click to expand...
Click to collapse
Yes 7.1.1.
Substratum created the overlay directory and the link to it.
Manually that would be:
mount -o rw,remount -t auto /vendor
mount -o rw,remount -t auto /system
mkdir /system/overlay
cd /system/vendor
ln -s /system/overlay
mount -o ro,remount -t auto /vendor
mount -o ro,remount -t auto /system
But links do take a very small amount of bytes (roughly name and target) so for that, you'll need some space in your vendor partition (no space left on /vendor). check with "df".
I have 3.8MB free (that's an original vendor + overlay link)
rchtk said:
mount -o rw,remount -t auto /vendor
mount -o rw,remount -t auto /system
mkdir /system/overlay
cd /system/vendor
ln -s /system/overlay
mount -o ro,remount -t auto /vendor
mount -o ro,remount -t auto /system
Click to expand...
Click to collapse
Well, this works and I was able to mount system and vendor, create the link, move the apk file, etc but it appears that the apk itself is not working on NPF10C. Thank you for your help and the refresher on the unix commands!

Categories

Resources