yashsingh1/xdaforums huggingface dataset:
[Touch CDMA General] zenulator:
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://xdaforums.com/showpost.php?p=3175504&postcount=1
[Touch CDMA General] zenulator:
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

adb forward tcp:1080 tcp:1080

Open firefox on your computer and type

about:config

search in the filter for

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.
[Touch CDMA General] ali3nfr3ak:
thank you Zen will give it a blast :D
[Touch CDMA General] jamezelle:
oooh yeah runs faster!!!:D:cool:
[Touch CDMA General] ali3nfr3ak:
smarty lol do you still need to keep sd card in slot after flashing?
[Touch CDMA General] ali3nfr3ak:
# 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?
[Touch CDMA General] jamezelle:
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)

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:cool:
[Touch CDMA General] zenulator:
you should put the symlink in the system folder before you squash it that way it should boot straight through.
[Touch CDMA General] zenulator:
if you edit init and put cache in /data you should be able to fully run from nand.

or from adb shell

cd /
umount /cache
mkdir /data/cache
mount /cache /data/cache

pull your sdcard. look ma running from nand.
[Touch CDMA General] jamezelle:
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?
[Touch CDMA General] zenulator:
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

free

and see how much ram/swap you have.

also i think

cat /proc/swaps

will show you what swap is being used.
[Touch CDMA General] ali3nfr3ak:
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

root@ubuntu:~# 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?
[Touch CDMA General] zenulator:
well the last command you typed should be

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.
[Touch CDMA General] loserskater:
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
[Touch CDMA General] zenulator:
I added a link in the first post. great work.
[Touch CDMA General] mrkite38:
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!
[Touch CDMA General] myn:
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
[Touch CDMA General] bangout:
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
[Touch CDMA General] ali3nfr3ak:
i thought the libs had to come from an ION build?
[Touch CDMA General] jamezelle:
no tattoo is a donut build, take the libril.so from sensehero1.3.3

and the libaudio.so and libaudioflinger.so from the /lib/donut from the rootfs
[Touch CDMA General] ali3nfr3ak:
was wondering if someone could give us a tutorial on setting up compcache. how to? do we need it for nand ? whats the best settings?
[Touch CDMA General] jamezelle:
you have to adb shell when booted up

then type

cd /lib/modules
insmod lzo_compress.ko
insmod lzo_decompress.ko
insmod xvmalloc.ko
insmod ramzswap.ko
swapon /dev/block/ramzswap0 -p 1

that will give you 25mb compcache

if you are using tattoo compcache is setup automatically
[Touch CDMA General] ali3nfr3ak:
ok that seems easy enough, all i have to do now is get a build up and running :mad: lol does it only auto setup for tatttoo, but not hero, donut or ion?
[Touch CDMA General] gswarriorfan:
will bluetooth work with this version?
[Touch CDMA General] nabicat:
Alright, all the great stuff happening has made me get off my duff and dig into this a bit. I'm trying to dig out files from the rootfs.img, which I believe is a yaffs2 image. As suggested in an earlier thread, I've installed Ubuntu on my machine, but can't figure out how to install yaffs2. Any info on how to extract files from the rootfs.img?

BTW. Thanks for posting all the great info. Already stripping out stuff from Hero builds to make them a bit slimmer.
[Touch CDMA General] loserskater:
mkdir rootfs-mnt
sudo mount -o loop rootfs.img rootfs-mnt

then copy the files you need from the rootfs-mnt folder
[Touch CDMA General] nabicat:
Did the trick!

Thanks
[Touch CDMA General] mssmison:
As a note to this, if you move the cache from your sdcard to your data parition you will be unable to download from the market.
[Touch CDMA General] jamezelle:
has anyone that has been using the libril.so from sensehero with tattoo noticed that all the calls recieved are from unknown:(.
[Touch CDMA General] nabicat:
Yes, same for me, however data only works when I use that combination. With the libril.so from the donut build the data failed to start for me.
[Touch CDMA General] zenulator:
I'm using this method now and just downloaded from the market and installed with no problem. You just need to make sure data/cache has the correct ownership and permissions.

​
[Touch CDMA General] plemen:
Yeah... really unfortunate - I suppose the libril.so from Sense is missing some function the tattoo build needs.
[Touch CDMA General] zenulator:
the correct way to go about all this would be to debug the donut libhtcgeneric.ril and find out why all the force closes happen in tattoo. htc drops their proprietary code into the libhtc_ril.so and libril.so for hero/sense builds. since our libhtcgeneric-ril.so is built for the opensource android and uses the opensource libril it's a shot in the dark. the senseHero libril.so i threw in is more of a quick hack. tattoo is a very nice build. but i'd almost rather let it go and get on with 2.0 which tattoo should eventually get.

anyone feel free to work on tattoo and see what you come up with. there is a new build in the xda tattoo thread. if anyone wants to try to port it it shouldn't be that hard.
[Touch CDMA General] jamezelle:
deodex script

ok here is a script for the devs

i mainly got the idea from enatefox's script. i decided to make it more user friendly. its pretty self explanatory.

credit to : enatefox(main idea) and JesusFreke for smala baksmali and deodexerant

it saves alot of time if you have done this manually you know what i am talking about!

included in zip:

-baksmali.jar

-smali.jar

-deodexerant

-Auto-Deodex.sh

-readme.txt

!!!this will only work on linux machines!!!

1 copy the contents of this zip file to your sdk-tools directory

2 plug phone in while in android

3 run Auto-Deodex.sh

4 make sure your path to sdk is the same path that includes: adb and the contents of this zip file

if you dont know what you are doing dont use this:)

Disclaimer: its not my fault if it breaks your computer:D

autodeodex.zip

md5: bf6b774dc360f2e308804e13f50f1d97
[Touch CDMA General] mssmison:
here is a link for a script for doing it in windows.http://xdaforums.com/showthread.php?t=598026
[Touch CDMA General] zenulator:
try this on the tattoo htc_ime?
[Touch CDMA General] jamezelle:
been there done that it doesnt work with donut....you have to copy the res-120 files to the original htc_ime that works if you want QVGA
[Touch CDMA General] zenulator:
well it's on with cyanogenmod.... install the adp donut build then drop the extracted cyanogenmod update.zip into /system and chmod executable system/bin and remove libaudio.so, libaudioflinger.so and libcameraservices.so from /system/lib and you should be good to go. if you have squashfs4 utils or just the unsquashfs from squashfs-utils 4.0 then you can extract the xbin.sqf from cyangogens and have nano and dropbear et all in /xbin. plus cyanogens latest has extra settings for compcache on/off (if you mod the script) and keep home app in memory. just a word for cyanogens shutdown/reboot you need to edit init.donut.rc to reflect his shutdown/reboot services. an example would be toolbox reboot -n -p for reboot in his script instead of what he has in the /system/bin/shutdown script. so add those services shutdown/reboot like in the cyanogen.init.rc that was used in the old cyanogenmod 4.1.xxx. (he doesn't have the htc/hero in bootclasspath additions anymore.) so cyanogen.init.rc might need to be changed in rootfs to reflect that. for now cyanogenmod=donut plus those shutdown/reboot scripts (ala shutdown -r for reboot in the script)(hold end key shutdown/reboot menu)...added bonus scripted shutdown for nand.....sync stop services remount ro and then reboot........you figure it out.:D
[Touch CDMA General] loserskater:
When trying to run the genext2fs command, I keep getting the "no free space" error message. I came across this (search about half way down "common build errors"). I was wondering if anybody had any help with how to fix this. I'm using Ubuntu 9.10.
[Touch CDMA General] zenulator:
bump up the -b option to a higher number. depending on the build. i've had to put it up to 200000 for some sense ui builds. some donut/eclair builds need 100000 which rounds out to about ~97.5mb.

genext2fs -d ./system -b 80000 -a system.ext2
[Touch CDMA General] loserskater:
Awesome! Thanks! Working fine now.

Another question... I'm trying to build a new data.img using some of the info from my old data. What can you pull out (as far as sms/saved games/etc.) and put into a new one without getting errors. I pulled the apps folder, and was wondering if I could pull some of the .dex's in dalvik-cache. And is it necessary to pull any of the folders in data? Also, do I need to pull etc/misc/smodem/system or will those be created?
[Touch CDMA General] tatnai:
quick tip on how to fix this?

EDIT: nm, just moved it back to the SD card.
[Touch CDMA General] jazmatician:
look up the following commands

chown = change owner

chmod = change permissions

I'm not being intentionally obtuse, I'm just hazily remembering from my early early days with web sites on UNIX boxes. for chmod 644 is read for everyone, and 777 is full permissions.
[Touch CDMA General] jazmatician:
ADB :headbonk:

I am at my wits end trying to get the adb interface working. I can't fix any of my own problems because I have no way to debug or look at a log.

have installed, uninstalled, updated, downdated, prayed, begged, pleaded, exercised and exorsized my phone on two different computers with at least a dozen builds and several versions of the drivers now. AT BEST, I get a Android Phone device (or a Dream ADB Device) with the "correct" ADB drivers (both Windows XP and 7 very strenuously warned me against installing them with bright red warnings about unsigned something something).

However, ADB doesn't recognize the phone. Ever. At all. adb devices is empty, adb shell *sometimes* gives me a # shell, but it's unintelligible with control codes, and it usually stops working after a cd or two. adb sometimes recognizes an emulator, but usually not.

I've tried the phone in USB debug mode (and without). I've tried mounting it from the notification and "don't mount"ing it (that doesn't work either). I've tried several different cables.

What am I missing???
[Touch CDMA General] mrkite38:
I know what you mean about the control codes, I have that same problem. But adb shell doesn't crash for me...

So, I'll help you. first question: what platform do you

want

this to work on?
[Touch CDMA General] sriram.chatty@gmail.com:
Try enabling "Stay Awake" under Settings->Applications->Development when you connect the android device. Open devmgmt.msc and check for Android USB Devices in the device manager. You are good to go. This worked for me like a charm. I did struggle few nights to figure this.
[Touch CDMA General] herpez:
As for the experience of all here, can this be made on blackstone port?

I would like to hear an opinion before i try it :)
[Touch CDMA General] KERKEDAGAIN:
..k, dunno what i'm doing wrong..i tried making a flashable version of sense-hero 1.3.3 following the nand tutorial on the first page..but when i try to boot it, first of all, doesnt recognize it as a hero build and i get errors saying "cannot find /system/bin/instalid" and about 5 other errors of things not found..i think i followed the instructions to the tee..any ideas/help?
[Touch CDMA General] jamezelle:
ill post it later tonight for you.
[Touch CDMA General] KERKEDAGAIN:
sweet, tanks
[Touch CDMA General] jamezelle:
http://www.4shared.com/file/183065850/ea691514/SenseHERO133NAND.html this is zens sensehero1.3.3 unchanged ONLY FOR NAND!!!!!!!!!!!

tested by me, it boots
[Touch CDMA General] KERKEDAGAIN:
thanks a bunch!! i'd love to know if n where i went wrong, though. Is there anything special that needed to be done? I'm using squashfs tools 3.3 n everything..
[Touch CDMA General] polyrhythmic:
Well, I just learned a new trick. In order to create a proper ext2 image for Android with the -a option, you have to be building the ext2 from a directory named either data or system. I had my system directory named system-themed and it kept choking... so I found the source code:

static void
prep_stat(const char *root_path)
{
int len = strlen(root_path);

if((len >= 4) && (!strcmp(root_path + len - 4, "data"))) {
source_path_len = len - 4;
} else if((len >= 7) && (!strcmp(root_path + len - 6, "system"))) {
source_path_len = len - 6;
} else {
error_msg_and_die("Fixstats (-a) option requested but "
"filesystem is not data or android!");
}
}

Pretty simple, but I guess that's what Android needs!
[Touch CDMA General] jazmatician:
Thanks for the help guys. I'm using a Sprint Vogue, with a 1.6 donut build. In about phone, it says it's a myTouch 3g, Kernel version 2.6.25-00923-g938e3ce-dirty martini@it0044296 Build number DRC83. The system I'm using was downloaded as system_aosp_v2.3.2.sqsh. None of that means anything to me, it's just the one I've been able to use that isn't horrifically slow (Hero builds), and I can download and/or run the Work Email and Google Voice applications.

When I turned USB debugging back on, I get the USB debugging connected notification on the phone, but the device manager shows a USB Mass Storage Device.

I have in the past had the "correct" ADB driver, so please don't assume I'm a moron. When I had that driver installed, my USB devices went INSANE, to the point where plugging in my phone made my mouse and keyboard unusable.

Since bluetooth still doesn't work, I am still booting to WM and using HAReT to launch linux, if that matters. I use a simple self-cooked 6.1 WM installation. GPS doesn't work in WM, so I'm not worried about it working in android, I just want to be able to use the ADB interface (at least to start with). Once I can get some insight into what's going on, I can have a few more ambitions.
[Touch CDMA General] jazmatician:
Partitioning an SD card in windows

For those of you without a working Linux installation, or you just don't want to boot into a liveCD environment for whatever reason (mine: lazy).

Windows sees an SD card as a removable device and for reasons only it knows cannot will not whatever, WON'T allow you to partition it more than once. Can't do it in DiskMgmt, can't even do it in the cmd line diskpart tool. It's not going to TELL you this, of course. But it can't be done.

What you have to do is change your phone to not display as a removable drive. In Windows Mobile, click Start> settings > Connections> USB to PC.

UNcheck the "Appear as removable device" box. Once you do that, diskpart/diskmgr will allow you to create multiple partitions.

Formatting those additional partitions as ext2? Apparently you have to buy special software (Paragon Partition Manager can't do ANYTHING in demo mode) or boot into linux. No good reason for it, I guess. There's a driver to let you read ext2 partitions, but nothing to let you create them. You only use them for linux, so do it in linux.

Sigh.
[Touch CDMA General] smarcin:
Paragon Parition Manager

Giveaway of the Day has Paragon's Partition Manager Personal 10.0 today. You can download it for free until 2 AM Central time (US). (Well, that would actually be 2 AM tomorrow, 1/12/10.) Here's the link:

http://www.giveawayoftheday.com/partition-manager-10-0-personal-english-holiday/

Be sure to read the readme file that comes with the download as it will tell you how to activate it. I did check and according to Paragon's website, it will do ex2 partitions on Windows. If you need the 64 bit version, be sure and use the correct link on giveawayoftheday.com. Partition Manager will work on windows 2000, xp, Vista and windows 7.

Sally
[Touch CDMA General] jazmatician:
Have ADB interface working

I installed onto a fat32/ext2/ext2 setup and now adb is working like a charm.

Anyone else having trouble with a haret data.img install, it may be worth slicing up your card (this is almost impossible to do in windows, use the LiveCD directions).
[Touch CDMA General] myn:
I was able to get squashfs installed.

I'm having an issue with adb though.

I followed the directions here: http://xdaforums.com/showpost.php?p=4336093&postcount=7363. I downloaded the Android SDK and extracted to /android-sdk-linux_86.

When I execute lsusb my vogue is listed:

root@ubuntu:/android-sdk-linux_86/tools# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[COLOR="Red"][B]Bus 002 Device 005: ID 0bb4:0c02 High Tech Computer Corp. [/B][/COLOR]
Bus 002 Device 002: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
root@ubuntu:/android-sdk-linux_86/tools#

I've created the file via gedit: /etc/udev/rules.d/50-android.rules and proceeded to set permissions: chmod a+rx /etc/udev/rules.d/50-android.rules

the contents of this file are:

SUBSYSTEM=="usb", SYSFS(idVendor)=="0bb4", MODE="0666"

I restarted the vmware image.

Upon running adb usb I get the following error:

root@ubuntu:/android-sdk-linux_86/tools# ./adb usb
error: insufficient permissions for device

When i run adb devices:

myn@ubuntu:~$ adb devices
List of devices attached
????????????	no permissions

For reference I am using Zen's Droid-Ion Donut 1.6 for the Vogue via ext2 and haret method. I am running ubuntu-9.10-desktop-i386 via VMWare. I have no issues with adb within windows.

Any help getting this resolved would be greatly appreciated.
[Touch CDMA General] Shidell:
That's a great catch, that snagged me a few times.. thought nix was having fits.

Thanks!