/system writable with unionfs - Gen8 General

Hi,
I've followed the instructions on how to build froyo on Ubuntu 10.04 32Bit,
I had to disable gdb in /buildroot/local/g8_arm/g8_arm.config
or shot make -i world
make menuconfig breaks everything
....so edit configs by hand.....
then it builds fine.....
thanks to his patch:
www android-hilfe de /android-os-entwicklung-customize/4801-kernel-module-kompilieren-erster-versuch.html
it runs (else unionfs complains about missing symbols..)
Code:
adb push unionfs.ko /data/local/tmp
adb push ntfs.ko /data/local/tmp
I've created a second 2GB ext3 partition on my sdhc class6
Code:
insmod /data/local/tmp/unionfs.ko
mount /dev/block/vold/179:18 /data/newroot
mount -t unionfs -o dirs="/data/newroot/rootfs=rw:/system=ro" unionfs /system
and now i've things like a writeble host file .....
it runs since yesterday here - and is fine.
jens

jensbln said:
Hi,
I've followed the instructions on how to build froyo on Ubuntu 10.04 32Bit,
I had to disable gdb in /buildroot/local/g8_arm/g8_arm.config
or shot make -i world
make menuconfig breaks everything
....so edit configs by hand.....
then it builds fine.....
thanks to his patch:
www android-hilfe de /android-os-entwicklung-customize/4801-kernel-module-kompilieren-erster-versuch.html
it runs (else unionfs complains about missing symbols..)
Code:
adb push unionfs.ko /data/local/tmp
adb push ntfs.ko /data/local/tmp
I've created a second 2GB ext3 partition on my sdhc class6
Code:
insmod /data/local/tmp/unionfs.ko
mount /dev/block/vold/179:18 /data/newroot
mount -t unionfs -o dirs="/data/newroot/rootfs=rw:/system=ro" unionfs /system
and now i've things like a writeble host file .....
it runs since yesterday here - and is fine.
jens
Click to expand...
Click to collapse
For morons like me what does that mean....root access??
Sorry if that is a dumb question

@mothy
so far, temporary root with writable /system directory

So just to be clear. Do you replace the kernel at all?
And do you have to mount the sd partition every time you boot up?

It's for the original Archos Kernel 2.6.29-omap1
Code:
# lsmod
ntfs 213028 0 - Live 0xbf276000
unionfs 74364 1 - Live 0xbf211000
this means you have to
temproot+"re"mount
the writable places, maybe soft-reboot (i use LCDDensity, it's soft-rebooting) and all your're changes are magicly there
instead of using sd, you can just create /data/newroot and let the things go there
Code:
# df -h
/dev/block/mmcblk0p4 299.4M 205.1M 78.9M 72% /data
i don't see any new rom's soon, unless we get a new bootloader, Archos uses mmcblk0 (an SD-Card device) and not mtd, so i think we can forget all that fastboot, flash_unlock mtd stuff.
this is very annoying, maybe i'm wrong,
but it looks like they don't want us to reflash the device :-(
unionfs usually need a own kernel, but the "ugly patches" make it run with the archos gen8 kernel
So i use temproot, gscript, LCDDensity after each reboot - and have all my settings back, apps like adsfree runs...
jens

forgive my lack of knowledge but you keep mentioning ntfs in the code fragments but you havent actually said that this is giving you ntfs support. does your kernal changes allow for reading ntfs volumes?

yes, i hope so, but i havn't tested it until now, minimum is that you can mount ntfs volumes by hand - but maybe it's automounting....
i want test a HD movie from sd, but mine doesnt fit in 4Gig (fat)
jens

i've connected same ntfs disk and:
Code:
usb 2-1:1.0: uevent
usb-storage 2-1:1.0: usb_probe_interface
usb-storage 2-1:1.0: usb_probe_interface - got id
devdb: devpath usb-musb_hdrc-1 not found
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
/mnt/flash/releases/G8A/v2.0.53-r80341/arcbuild/linux/drivers/usb/core/inode.c: creating file '002'
hub 2-0:1.0: state 7 ports 1 chg 0000 evt 0002
hub 2-0:1.0: port 1 enable change, status 00000503
scsi 0:0:0:0: Direct-Access SAMSUNG HM160HI PQ: 0 ANSI: 2
sd 0:0:0:0: [sda] 312581808 512-byte hardware sectors: (160 GB/149 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 38 00 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] 312581808 512-byte hardware sectors: (160 GB/149 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 38 00 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 0:0:0:0: [sda] Attached SCSI disk
usb-storage: device scan complete
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev sda1.
hub 2-0:1.0: state 7 ports 1 chg 0000 evt 0002
hub 2-0:1.0: port 1, status 0100, change 0001, 12 Mb/s
usb 2-1: USB disconnect, address 2
usb 2-1: unregistering device
usb 2-1: usb_disable_device nuking all URBs
usb 2-1: unregistering interface 2-1:1.0
same things more need to be done, a trick could be having a small fat partition, so the system has it's sda1 as fas as expecting .....
jens

Related

Resize sdcard partition on mac

I am trying to resize the sdcard partition on the bootable cm7 sd card image. I am able to resize it using Windows and Linux, but haven't found an easy way to do it via Mac OS using the built in sdcard reader. Does anyone know how to accomplish this?
Have you tried disk utility?
Sent from my NookColor using XDA
I have. It doesn't allow me to change the size of the last partition on the card.
You can use the Sudo command to format your card on the mac from the command line. Just type Type sudo or su -
fdisk /dev/sda
mkfs -t vfat /dev/sda1
That should format your card. Just partition with fdisk. Be sure to choose the whole device (/dev/sdc), not a single partition (/dev/sdc1).
fdisk is started by typing (as root) fdisk device at the command prompt. device might be something like /dev/hda or /dev/sda.
To check the list of devices available type fdisk -l
The basic fdisk commands you need are:
p – Print the partition table.
n – Create a new partition.
d – Delete a partition.
q – Quit without saving changes.
a – Make a partition bootable.
w – Write the new partition table and exit.
Changes you make to the partition table do not take effect until you issue the write (w) command. Here is a sample partition table:
Disk /dev/sdb: 64 heads, 63 sectors, 621 cylinders
Units = cylinders of 4032 * 512 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 184 370912+ 83 Linux
/dev/sdb2 185 368 370944 83 Linux
/dev/sdb3 369 552 370944 83 Linux
/dev/sdb4 553 621 139104 82 Linux swap

[Q] USBOTG for Galaxy Y GT-S5360

This is my first thread/post in the forum, so I am not quite sure if this is the right place for this question. I recently happened to see a schematic diagram of the GT-S5360. I noticed that the main chipset includes support for USBOTG HS(480 Mbps).
http://forum.xda-developers.com/showthread.php?t=1489767
If this is indeed true, is there any way we can enable this feature in the GT-S5360? I mean, is there a custom ROM/Kernel which enables this feature?
Apologies if I have posted this in the wrong section.
If you have usb otg cable then try kuro and merruk kernel....
And search before posting
Sent from my GT-S5360 using xda premium
Hi, please look in the dev section. We already have 2-3 kernels which enable us to use this feature, if i'm not wrong.
Sent from my GT-S5360 using xda premium
that is a block diagram not schematic
alkesh95 said:
If you have usb otg cable then try kuro and merruk kernel....
And search before posting
Sent from my GT-S5360 using xda premium
Click to expand...
Click to collapse
Thanks for the response Alkesh, I will try those. I had infact searched for something similar in the forum but could not come up with any names - maybe I did something wrong. I found this though: http://forum.xda-developers.com/showthread.php?t=1493325
my kernel didn't support it
my kernel is based on samsung's sourcode. on other hand, our "beloved" samsung have messed up the source code. thus, make the OTG stuff on the kernel didn't work.
kurotsugi said:
my kernel didn't support it
my kernel is based on samsung's sourcode. on other hand, our "beloved" samsung have messed up the source code. thus, make the OTG stuff on the kernel didn't work.
Click to expand...
Click to collapse
Thanks for clarifying Kurotsugi. So is there any kernel which supports this feature currently? I searched the development forums - seems Merruk also doesnt support this feature currently, Maroc-OS is working on it as I understand from http://forum.xda-developers.com/showthread.php?t=1550065
xdroid_noob said:
Thanks for clarifying Kurotsugi. So is there any kernel which supports this feature currently? I searched the development forums - seems Merruk also doesnt support this feature currently, Maroc-OS is working on it as I understand from http://forum.xda-developers.com/showthread.php?t=1550065
Click to expand...
Click to collapse
if you have the cable you can try that.
ask samsung
works now
Hi guys.
Sorry for necroposting.
Also this post should probably go to development section, but I don't have access to post there (yet?).
First of all, BCM21553 seems to lack ID pin. ID pin from USB connector goes straight to PMU chip instead.
It is used to detect the type of the charger as far as I can tell.
It's not a big deal to extend PMU isr's to support OTG cable as a different type of charger (yes, external +5v source is required).
The real trick (for me) was to find a way to force DWC core into Host mode. Looks like Synopsis is no longer sharing datasheets with public.
Luckily Broadcom is not the only company which uses the same USB IP.
It looks like DWC driver was designed for an older kernel version.
It was partly ported by Samsung, but only as much as required to support the device mode.
It's still very flaky and fragile. For instance, it you try to cat /sys/devices/lm-2/mode, it will panic the stock kernel.
All HC code is non-functional and does not even build out of the box.
It took me almost a week to fix all the bugs and to be able to build standalone dwc_otg.ko with working HC code.
At the moment I managed to successfully mount a memory stick on my phone. Device mode is not there yet, but I don't really need it:
I'm building a telemetry project and I need the cheapest solution.
If anypony is still interested in HC on SGY, please reply and I will follow up with more details.
thats pretty awesome news.....this should be moved to development section......
Sent from my Typewriter
A bit of logs to support my statement
Code:
<6>[ 1185.825469] dwc_otg: version 2.60a 22-NOV-2006
<6>[ 1185.825531] lm_driver_register()
<6>[ 1185.825592] lm_match()
<6>[ 1185.825622] lm_bus_probe()
<3>[ 1185.825653] Debug level= 17
<3>[ 1185.825683] dwc_otg lm-2: dwc_otg_driver_probe, version 020-10-01-09
<6>[ 1185.826019] It is Ok to create charging current work queue...
<4>[ 1185.826080] >> create: c483f5e0
<6>[ 1185.826324] start_usb_clk_phy
<4>[ 1185.826354] DWC_otg: 1
<4>[ 1185.826385] DWC_otg: 2
<4>[ 1185.826416] DWC_otg: dwc_otg_core_reset() GRSTCTL=80000000
<4>[ 1185.826446] DWC_otg: dwc_otg_core_reset() value to set=80000001
<4>[ 1185.826477] DWC_otg: 3
<4>[ 1185.931610] DWC_otg: 1
<4>[ 1185.931640] DWC_otg: 2
<4>[ 1185.931671] DWC_otg: dwc_otg_core_reset() GRSTCTL=80000000
<4>[ 1185.931701] DWC_otg: dwc_otg_core_reset() value to set=80000001
<4>[ 1185.931701] DWC_otg: 3
<4>[ 1186.853454] >>>> unicorn 1
<4>[ 1186.853485] dwc_otg_pcd_init(c483f5e0)
<4>[ 1186.853485] Dedicated Tx FIFOs mode
<4>[ 1186.853607] registering handler for irq21
<6>[ 1186.853698] DWC_otg: pcd->setup_pkt=0xff6b3000, pcd->setup_pkt_dma_handle=0x82982000
<6>[ 1186.853729] DWC_otg: pcd->status_buf=0xff6b4000, pcd->status_buf_dma_handle=0x85d33000
<4>[ 1186.853729] pcd->setup_pkt=0xff6b3000, pcd->setup_pkt_dma_handle=0x82982000
<4>[ 1186.853759] pcd->status_buf=0xff6b4000, pcd->status_buf_dma_handle=0x85d33000
<6>[ 1186.853790] DWC_otg: Using DMA mode
<6>[ 1186.853820] dwc_otg lm-2: DWC OTG Controller
<6>[ 1186.853851] dwc_otg lm-2: new USB bus registered, assigned bus number 1
<6>[ 1186.853912] dwc_otg lm-2: irq 21, io mem 0x00000000
<6>[ 1186.853973] DWC_otg: Init: Port Power? op_state=1
<6>[ 1186.853973] DWC_otg: Init: Power Port (0)
<7>[ 1186.854064] usb usb1: default language 0x0409
<7>[ 1186.854125] usb usb1: udev 1, busnum 1, minor = 0
<6>[ 1186.854156] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
<6>[ 1186.854156] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
<6>[ 1186.854187] usb usb1: Product: DWC OTG Controller
<6>[ 1186.854217] usb usb1: Manufacturer: Linux 2.6.35.7 dwc_otg_hcd
<6>[ 1186.854217] usb usb1: SerialNumber: lm-2
<7>[ 1186.856048] usb usb1: usb_probe_device
<7>[ 1186.856109] usb usb1: configuration #1 chosen from 1 choice
<7>[ 1186.856170] usb usb1: adding 1-0:1.0 (config #1, interface 0)
<7>[ 1186.857482] hub 1-0:1.0: usb_probe_interface
<7>[ 1186.857513] hub 1-0:1.0: usb_probe_interface - got id
<6>[ 1186.857543] hub 1-0:1.0: USB hub found
<6>[ 1186.857604] hub 1-0:1.0: 1 port detected
<7>[ 1186.857604] hub 1-0:1.0: standalone hub
<7>[ 1186.857635] hub 1-0:1.0: ganged power switching
<7>[ 1186.857666] hub 1-0:1.0: individual port over-current protection
<7>[ 1186.857666] hub 1-0:1.0: Single TT
<7>[ 1186.857696] hub 1-0:1.0: TT requires at most 8 FS bit times (666 ns)
<7>[ 1186.857696] hub 1-0:1.0: power on to power good time: 2ms
<7>[ 1186.857757] hub 1-0:1.0: local power source is good
<7>[ 1186.857757] hub 1-0:1.0: enabling power on all ports
<7>[ 1186.955078] hub 1-0:1.0: port 1: status 0101 change 0001
<7>[ 1187.056640] hub 1-0:1.0: state 7 ports 1 chg 0002 evt 0000
<7>[ 1187.056701] hub 1-0:1.0: port 1, status 0101, change 0000, 12 Mb/s
<6>[ 1187.251861] usb 1-1: new high speed USB device using dwc_otg and address 2
<7>[ 1187.472076] usb 1-1: default language 0x0409
<7>[ 1187.473388] usb 1-1: udev 2, busnum 1, minor = 1
<6>[ 1187.473419] usb 1-1: New USB device found, idVendor=8564, idProduct=1000
<6>[ 1187.473449] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
<6>[ 1187.473480] usb 1-1: Product: Mass Storage Device
<6>[ 1187.473510] usb 1-1: Manufacturer: JetFlash
<6>[ 1187.473541] usb 1-1: SerialNumber: 5550N3UJAP62NU0R
<7>[ 1187.475555] usb 1-1: usb_probe_device
<7>[ 1187.475616] usb 1-1: configuration #1 chosen from 1 choice
<7>[ 1187.475830] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
<7>[ 1187.477294] libusual 1-1:1.0: usb_probe_interface
<7>[ 1187.477355] libusual 1-1:1.0: usb_probe_interface - got id
<7>[ 1187.477447] usb-storage 1-1:1.0: usb_probe_interface
<7>[ 1187.477478] usb-storage 1-1:1.0: usb_probe_interface - got id
<6>[ 1187.477874] scsi3 : usb-storage 1-1:1.0
<7>[ 1187.482482] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
<7>[ 1187.482543] hub 1-0:1.0: port 1 enable change, status 00000503
<5>[ 1188.822296] scsi 3:0:0:0: Direct-Access JetFlash Transcend 8GB 1100 PQ: 0 ANSI: 0 CCS
<5>[ 1188.829681] sd 3:0:0:0: [sda] 15826944 512-byte logical blocks: (8.10 GB/7.54 GiB)
<5>[ 1188.830444] sd 3:0:0:0: [sda] Write Protect is off
<7>[ 1188.830505] sd 3:0:0:0: [sda] Mode Sense: 43 00 00 00
<3>[ 1188.830535] sd 3:0:0:0: [sda] Assuming drive cache: write through
<3>[ 1188.834808] sd 3:0:0:0: [sda] Assuming drive cache: write through
<6>[ 1188.834930] sda:
<3>[ 1188.841308] sd 3:0:0:0: [sda] Assuming drive cache: write through
<5>[ 1188.841339] sd 3:0:0:0: [sda] Attached SCSI removable disk
<4>[ 1192.035308] wl_iw_event: dev=eth0 event=20
/mnt/sdcard/mod # mount -r -t vfat /dev/block/sda /sdcard/media
/mnt/sdcard/mod # busybox df /sdcard/media
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/block/sda 7898024 3906992 3991032 49% /mnt/sdcard/media
/mnt/sdcard/mod # ls /sdcard/media
ubninit
EFI
ubnkern
boot
casper
dists
install
isolinux
pics
pool
preseed
ubnpathl.txt
README.diskdefines
autorun.inf
md5sum.txt
wubi.exe
ubnfilel.txt
ldlinux.sys
syslinux.cfg
menu.c32
HBCD
/mnt/sdcard/mod #
/mnt/sdcard/media # lsmod
dwc_otg 125404 0 - Live 0xbf262000
sd_mod 26464 1 - Live 0xbf136000
usb_storage 34867 1 - Live 0xbf257000
usb_libusual 9839 1 usb_storage, Live 0xbf09c000
scsi_mod 124018 2 sd_mod,usb_storage, Live 0xbf228000
lm 2661 1 dwc_otg, Live 0xbf055000
usbcore 146797 3 dwc_otg,usb_storage,usb_libusual, Live 0xbf18d000
bcm4330 275939 0 - Live 0xbf147000
brcm_headsetsw 7603 0 - Live 0xbf13f000
gememalloc 661 0 - Live 0xbf133000 (P)
h6270enc 3469 0 - Live 0xbf12d000
hx170dec 5362 0 - Live 0xbf125000
sec_param 8980 0 - Live 0xbf11d000
j4fs 70799 1 - Live 0xbf105000 (P)
rfs_fat 247794 3 - Live 0xbf0bd000 (P)
rfs_glue 79181 1 rfs_fat, Live 0xbf0a1000 (P)
fsr_stl 255325 5 j4fs, Live 0xbf05b000 (P)
fsr 338224 2 sec_param,fsr_stl, Live 0xbf000000 (P)
/mnt/sdcard/media #
Currently I'm working on PMU driver to allow the phone to charge while connected via Y-cable.
Once ready I'll post some binaries and patches against stock kernel sources so you will be able to try it out, or take over if you would like to.
After that I could probably try to restore gadget functionality as loadable module and probably add something to switch device/host mode automatically based on cable type.
But personally I don't need gadget functionality at all, so I'm not sure when I will be able to find enough spare time to do this.
PS.
Please don't move it to development section just yet - I won't be able to post there (need 10 posts or something like that).
Here we go, as promised.
I've decided to test whether SGY is powerful enough to play movies from external USB HDD drive with truecrypted ext4 fs.
It turns out to be good enough.
Code:
/mnt/sdcard/mod # busybox cp ../dmsetup /dev
/mnt/sdcard/mod # busybox chmod +x /dev/dmsetup
/mnt/sdcard/mod # insmod usbcore.ko
/mnt/sdcard/mod # insmod lm.ko
/mnt/sdcard/mod # insmod dwc_otg.ko
/mnt/sdcard/mod # insmod scsi_mod.ko
/mnt/sdcard/mod # insmod sd_mod.ko
/mnt/sdcard/mod # insmod usb-libusual.ko
/mnt/sdcard/mod # insmod usb-storage.ko
/mnt/sdcard/mod # busybox ls -l /dev/block/sda
brw------- 1 0 0 8, 0 Jul 20 04:18 /dev/block/sda
/mnt/sdcard/mod # insmod gf128mul.ko
/mnt/sdcard/mod # insmod xts.ko
/mnt/sdcard/mod # /dev/dmsetup create tc0 --table "0 976772656 crypt aes-xts-pla
in64 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 256 8:0 256"
/mnt/sdcard/mod # insmod jbd2.ko
/mnt/sdcard/mod # insmod ext4.ko
/mnt/sdcard/mod # mount -t ext4 -r /dev/mapper/tc0 /sdcard/media
/mnt/sdcard/mod # am start -n com.mxtech.videoplayer.ad/.ActivityScreen -d /mnt/sdcard/media/Videos/cartoon/mlp/My.Little.Pony.Friendship.Is.Magic.S01E26.The.Best.Night.Ever.480p.WEB-DL.DD5.1.h.264-ETP.mkv
Attachment contains kernel update which you can flash using recovery mode.
Basically, it is an ordinary Samsung kernel without any USB code and with some minor hw-related tweaks.
modules.tar.bz2 contains all modules from snippet above plus HID and FTDI support.
It's huge because of ext4.ko. You probably won't need it.
dwc_otg.ko is USB driver itself. At the moment it has host-only functionality.
It means - it is a very bad idea to connect your phone to PC with this module loaded. Be warned.
Also, I'm using Y-cabe with 30k resistor between D+ and D-. This way MUIC thinks that phone is plugged into 1A charger.
At the same time, D+/D- is routed USB PHY. This hack is statically linked into the kernel.
So - don't try to charge your phone with this kernel with chargers with D+/D- shortened.
Oh, yeah. ID pin connection is irrelevant at the moment, so you can hack any micro-usb cable in the middle - no complex soldering required.
Disclaimer: You may brick your phone. Do it on your own risk. This post is developer-oriented.
If you do not fully understand what's written above - better don't do it at all.
uunicorn said:
Here we go, as promised.
I've decided to test whether SGY is powerful enough to play movies from external USB HDD drive with truecrypted ext4 fs.
It turns out to be good enough.
Code:
/mnt/sdcard/mod # busybox cp ../dmsetup /dev
/mnt/sdcard/mod # busybox chmod +x /dev/dmsetup
/mnt/sdcard/mod # insmod usbcore.ko
/mnt/sdcard/mod # insmod lm.ko
/mnt/sdcard/mod # insmod dwc_otg.ko
/mnt/sdcard/mod # insmod scsi_mod.ko
/mnt/sdcard/mod # insmod sd_mod.ko
/mnt/sdcard/mod # insmod usb-libusual.ko
/mnt/sdcard/mod # insmod usb-storage.ko
/mnt/sdcard/mod # busybox ls -l /dev/block/sda
brw------- 1 0 0 8, 0 Jul 20 04:18 /dev/block/sda
/mnt/sdcard/mod # insmod gf128mul.ko
/mnt/sdcard/mod # insmod xts.ko
/mnt/sdcard/mod # /dev/dmsetup create tc0 --table "0 976772656 crypt aes-xts-pla
in64 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 256 8:0 256"
/mnt/sdcard/mod # insmod jbd2.ko
/mnt/sdcard/mod # insmod ext4.ko
/mnt/sdcard/mod # mount -t ext4 -r /dev/mapper/tc0 /sdcard/media
/mnt/sdcard/mod # am start -n com.mxtech.videoplayer.ad/.ActivityScreen -d /mnt/sdcard/media/Videos/cartoon/mlp/My.Little.Pony.Friendship.Is.Magic.S01E26.The.Best.Night.Ever.480p.WEB-DL.DD5.1.h.264-ETP.mkv
Attachment contains kernel update which you can flash using recovery mode.
Basically, it is an ordinary Samsung kernel without any USB code and with some minor hw-related tweaks.
modules.tar.bz2 contains all modules from snippet above plus HID and FTDI support.
It's huge because of ext4.ko. You probably won't need it.
dwc_otg.ko is USB driver itself. At the moment it has host-only functionality.
It means - it is a very bad idea to connect your phone to PC with this module loaded. Be warned.
Also, I'm using Y-cabe with 30k resistor between D+ and D-. This way MUIC thinks that phone is plugged into 1A charger.
At the same time, D+/D- is routed USB PHY. This hack is statically linked into the kernel.
So - don't try to charge your phone with this kernel with chargers with D+/D- shortened.
Oh, yeah. ID pin connection is irrelevant at the moment, so you can hack any micro-usb cable in the middle - no complex soldering required.
Disclaimer: You may brick your phone. Do it on your own risk. This post is developer-oriented.
If you do not fully understand what's written above - better don't do it at all.
Click to expand...
Click to collapse
Dude what you are doing is great but the problem is its too much difficult for average member to understand what all this means....you should give a better discription about what you have done with the kernel and what is the advantage of that and how it will work.....uploading kernels like this could lead to someone bricking their phone....
According to me you should team up with someone and make a thread in dev section.....
Sent from my Dishwasher
-HellRaiser- said:
you should give a better discription about what you have done with the kernel and what is the advantage of that and how it will work.....
Click to expand...
Click to collapse
Yes, I know, but there is nothing user-friendly to show yet.
There is not much profit for an avg phone user until automatic switching between host and device mode is added.
After this feature is implemented in usb driver, it could be incorporated into someones custom kernel distribution and OTG will just work out of the box.
At the moment it is just an ongoing development, which I would like to share with other developers, because I do not think I have enough motivation to finish everything by myself.
-HellRaiser- said:
uploading kernels like this could lead to someone bricking their phone....
Click to expand...
Click to collapse
Hence all the warnings.
-HellRaiser- said:
According to me you should team up with someone and make a thread in dev section.....
Click to expand...
Click to collapse
There is a thread about OTG on SGY already in development section, but I can't even bump it - no rights to post there.
Someone could probably post a link to this thread there, I suppose.
uunicorn said:
There is a thread about OTG on SGY already in development section, but I can't even bump it - no rights to post there.
Someone could probably post a link to this thread there, I suppose.
Click to expand...
Click to collapse
I bumped it for you :good:
btw, I think you need 10 posts in order to start a thread or post on development section.
anyways, keep up the good work!!!
uunicorn said:
Yes, I know, but there is nothing user-friendly to show yet.
There is not much profit for an avg phone user until automatic switching between host and device mode is added.
After this feature is implemented in usb driver, it could be incorporated into someones custom kernel distribution and OTG will just work out of the box.
At the moment it is just an ongoing development, which I would like to share with other developers, because I do not think I have enough motivation to finish everything by myself.
Hence all the warnings.
There is a thread about OTG on SGY already in development section, but I can't even bump it - no rights to post there.
Someone could probably post a link to this thread there, I suppose.
Click to expand...
Click to collapse
uunicorn said:
Yes, I know, but there is nothing user-friendly to show yet.
There is not much profit for an avg phone user until automatic switching between host and device mode is added.
After this feature is implemented in usb driver, it could be incorporated into someones custom kernel distribution and OTG will just work out of the box.
At the moment it is just an ongoing development, which I would like to share with other developers, because I do not think I have enough motivation to finish everything by myself.
Hence all the warnings.
There is a thread about OTG on SGY already in development section, but I can't even bump it - no rights to post there.
Someone could probably post a link to this thread there, I suppose.
Click to expand...
Click to collapse
what need to doing ?
flash your kernel
for what is modules and dmsetup ?
I can't understand ?
uunicorn said:
Here we go, as promised.
I've decided to test whether SGY is powerful enough to play movies from external USB HDD drive with truecrypted ext4 fs.
It turns out to be good enough.
Code:
/mnt/sdcard/mod # busybox cp ../dmsetup /dev
/mnt/sdcard/mod # busybox chmod +x /dev/dmsetup
/mnt/sdcard/mod # insmod usbcore.ko
/mnt/sdcard/mod # insmod lm.ko
/mnt/sdcard/mod # insmod dwc_otg.ko
/mnt/sdcard/mod # insmod scsi_mod.ko
/mnt/sdcard/mod # insmod sd_mod.ko
/mnt/sdcard/mod # insmod usb-libusual.ko
/mnt/sdcard/mod # insmod usb-storage.ko
/mnt/sdcard/mod # busybox ls -l /dev/block/sda
brw------- 1 0 0 8, 0 Jul 20 04:18 /dev/block/sda
/mnt/sdcard/mod # insmod gf128mul.ko
/mnt/sdcard/mod # insmod xts.ko
/mnt/sdcard/mod # /dev/dmsetup create tc0 --table "0 976772656 crypt aes-xts-pla
in64 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 256 8:0 256"
/mnt/sdcard/mod # insmod jbd2.ko
/mnt/sdcard/mod # insmod ext4.ko
/mnt/sdcard/mod # mount -t ext4 -r /dev/mapper/tc0 /sdcard/media
/mnt/sdcard/mod # am start -n com.mxtech.videoplayer.ad/.ActivityScreen -d /mnt/sdcard/media/Videos/cartoon/mlp/My.Little.Pony.Friendship.Is.Magic.S01E26.The.Best.Night.Ever.480p.WEB-DL.DD5.1.h.264-ETP.mkv
Attachment contains kernel update which you can flash using recovery mode.
Basically, it is an ordinary Samsung kernel without any USB code and with some minor hw-related tweaks.
modules.tar.bz2 contains all modules from snippet above plus HID and FTDI support.
It's huge because of ext4.ko. You probably won't need it.
dwc_otg.ko is USB driver itself. At the moment it has host-only functionality.
It means - it is a very bad idea to connect your phone to PC with this module loaded. Be warned.
Also, I'm using Y-cabe with 30k resistor between D+ and D-. This way MUIC thinks that phone is plugged into 1A charger.
At the same time, D+/D- is routed USB PHY. This hack is statically linked into the kernel.
So - don't try to charge your phone with this kernel with chargers with D+/D- shortened.
Oh, yeah. ID pin connection is irrelevant at the moment, so you can hack any micro-usb cable in the middle - no complex soldering required.
Disclaimer: You may brick your phone. Do it on your own risk. This post is developer-oriented.
If you do not fully understand what's written above - better don't do it at all.
Click to expand...
Click to collapse
A Biggg Thanks to you Master....
I am the one who tried for the same target before... But not yet successed..
I am very much curious to see the source or the patch for this.
I hope you will move your code to github or somethig...
Again .. You have Done a Great Job..
Sorry for reviving old post first of all guys, I'm a Galaxy Ace-I user (cooperve, not cooper) and I've found out that our phone in particular, just like the SGY has a BCM21552 (physically that's what the chip reads not 21553 lol), which also supports OTG as I've stated in this thread, I really think it'd be interesting if S5830i and SGY developers could join forces to make this go through
Whats the status of last development of OTG support?

[Q] USB port not working

Long week, got tablet back after playing with fire, but now the A500s USB port doesn't recognize the hard drive I just used on it Tuesday. Did hard reset with side button. No luck. Rooted have CPUID etc., backup nand from 9/30/12, boatloader works, etc. Any ideas?
Try to mount the harddrive manually with drive mount from play.
Gesendet von meinem Iconia A501 mit Tapatalk 2
Thank you for that knowledge. I haven't had any luck yet with drive mount....could my drive or USB cable be bad? Seems like the cable used to fit tighter than this.
Prof24 said:
Thank you for that knowledge. I haven't had any luck yet with drive mount....could my drive or USB cable be bad? Seems like the cable used to fit tighter than this.
Click to expand...
Click to collapse
You can check dmesg through adb shell after pluging in the USB device to see if it is recognized at all.
You should get some USB related messages towards the end when connecting anything.
Code:
adb shell dmesg
Example from pluging in a USB memory stick:
Code:
<6>[ 113.242223] usb 1-1: new high speed USB device using tegra-ehci and address 2
<6>[ 115.292692] usb 1-1: New USB device found, idVendor=08ec, idProduct=0020
<6>[ 115.293082] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
<6>[ 115.293735] usb 1-1: Product: Store'n'go
<6>[ 115.294085] usb 1-1: Manufacturer: Verbatim
<6>[ 115.294827] usb 1-1: SerialNumber: ...
<6>[ 115.305165] scsi0 : usb-storage 1-1:1.0
<5>[ 116.309174] scsi 0:0:0:0: Direct-Access VBTM Store'n'go 6.51 PQ: 0 ANSI: 0 CCS
<5>[ 116.311125] sd 0:0:0:0: Attached scsi generic sg0 type 0
<5>[ 116.315141] sd 0:0:0:0: [sda] 1952767 512-byte logical blocks: (999 MB/953 MiB)
<5>[ 116.316231] sd 0:0:0:0: [sda] Write Protect is off
<7>[ 116.316699] sd 0:0:0:0: [sda] Mode Sense: 45 00 00 08
<3>[ 116.316960] sd 0:0:0:0: [sda] Assuming drive cache: write through
<3>[ 116.322523] sd 0:0:0:0: [sda] Assuming drive cache: write through
<6>[ 116.352181] sda: sda1
<3>[ 116.362397] sd 0:0:0:0: [sda] Assuming drive cache: write through
<5>[ 116.362572] sd 0:0:0:0: [sda] Attached SCSI removable disk
Try using the Paragon app from the market. Drive mount don't work with ICS I believe.
MD
Drive Mount works for me on 4.0.4.
Gesendet von meinem Iconia A501 mit Tapatalk 2
In the interim decided to try Thor's JB rom. No mass storage support in current version (at least I believe that's true - on v.12), but stable for me and suits my needs. I'm not moving tons of files, so SD card and/or mini USB will work fine for now (mass storage just a bit of a time saver). Thanks though!
Prof24 said:
In the interim decided to try Thor's JB rom. No mass storage support in current version (at least I believe that's true - on v.12), but stable for me and suits my needs. I'm not moving tons of files, so SD card and/or mini USB will work fine for now (mass storage just a bit of a time saver). Thanks though!
Click to expand...
Click to collapse
Hey, if you're happy..... :angel:

I've found a way to access "dead" internal sdcard. need help to make a permanent fix

I've found a way to access "dead" internal sdcard. need help to make a permanent fix
I think i've accidentally discovered a way to restore access to dead internal sd card.
And sorry for my broken english
You can skip the story till the "*Punchline*"
So i got a i9000 to try and save.
He has no /dev/block/mmcblk0 when the microsd card was out and when the microsd was in, the microsd was the mmcblk0 instead of mmcblk1
So i've did the regular fix, made 2 partitions on the microsd. one for the usb storage and one for the /data
The device got back to life but still without the internal sd(as expected).
On /dev/block he has only the mmcblk0 via recovery or regular boot (Using adb shell)
Then i had a problem, the camera won't work. its had that message "insert sd card before using the camera"
And on logcat you see that error: "E/CameraStorage( 3950): Failed to create /storage/sdcard0/DCIM/100ANDRO"
Although the mmcblk0 is the microsd now, and there is no mmcblk1 the ROM (cm11 on that case)
mounted the microsd usb storage partition (mmcblk0p1) on /storage/sdcard1/ and not /storage/sdcard0/
(The mount of /data and /sdcard are made via lvm)
I've tried to manually mount /dev/block/mmcblk0p1 on /storage/sdcard0/ - didn't worked (don't rembere the error message )
Tried link /storage/sdcard0/ -> /storage/sdcard1/ got some error about file system link
And when tired to mkdir /storage/sdcard0/DCIM got readonly file system error.
So i've wanted to switch between them via the lvm mount in fstab (I didn't really know how to do so)
On the using adb shell (on the rom, not recovery) i've edited the /fstab.aries
and commnted the lines that starts with "devices/platform/s3c-sdhci"
My final fstab.aries:
http://pastebin.com/tEH042Jn
*Punchline*
Then i did "reboot recovery"
And on the recovery the internal sd card was back!!
i've managed to mount it and access the usb storage partition & data partition!
Code:
~ # ls /dev/block
dm-0 loop6 mmcblk1p1 mtdblock6 ram14 ram8
dm-1 loop7 mmcblk1p2 platform ram15 ram9
loop0 mmcblk0 mtdblock0 ram0 ram2 vold
loop1 mmcblk0boot0 mtdblock1 ram1 ram3 zram0
loop2 mmcblk0boot1 mtdblock2 ram10 ram4
loop3 mmcblk0p1 mtdblock3 ram11 ram5
loop4 mmcblk0p2 mtdblock4 ram12 ram6
loop5 mmcblk1 mtdblock5 ram13 ram7
And the microsd was pushed to be mmcblk1 as it should be.
The problem is that if you restart the device back to the ROM, the fstab.aries being overwritten and the the SD is gone again.
But if you edit the fstab.aries again and reboot directly to recovery you will get it again.
---
I don't know yet why that happening, maybe the voldmanaged/LVM mount configurations crashing the internal sd device on startup
But its looks like something that can be fixed!
I'll keep trying to fix that myself, but i'm sure there are gurus here that can do it!
Updates:
I'm copying the data from the internal sd to the micro sd and its have some bad blocks (not unexpected)
Code:
<3>[ 4321.898448] mmcblk0: error -110 transferring data, sector 4075478, nr 32, cmd response 0x900, card status 0x0
<3>[ 4321.899766] end_request: I/O error, dev mmcblk0, sector 4075478
<3>[ 4324.516733] mmcblk0: r/w command failed, status = 0x80900
<3>[ 4324.517935] end_request: I/O error, dev mmcblk0, sector 4075479
<3>[ 4324.518642] end_request: I/O error, dev mmcblk0, sector 4075486
<3>[ 4324.519796] end_request: I/O error, dev mmcblk0, sector 4075494
<3>[ 4324.520497] end_request: I/O error, dev mmcblk0, sector 4075502
<3>[ 4327.138573] mmcblk0: error -110 transferring data, sector 4075478, nr 8, cmd response 0x900, card status 0x80b00
<4>[ 4327.139838] mmcblk0: retrying using single block read
<3>[ 4329.756913] mmcblk0: error -110 transferring data, sector 4075478, nr 8, cmd response 0x900, card status 0x0
...
After the backup ill try to completely wipe the device & recreate the partitions

Adding an SD card to Glowlights (2, 3, 4)

This all started out in a Glowlight 4 (7.8", 2019) thread: https://forum.xda-developers.com/nook-touch/general/glowlight-plus-7-8-2019-t3934677
An SD card was soldered to test points on the circuit board of a Glow4 to allow for extra storage.
Since it looks like this same technique should work on Glow2 & Glow3 I've broken the thread out here.
The Glow4 has test points labelled by function and has been tested and proven to work with SD cards.
http://www.temblast.com/blogs/glow4/blog.htm#sdcard
The Glow3 has test points labelled by function and has not yet been tested.
The Glow2 has test points, but they are not labelled by function.
I will try to "wiggle" out the pinout soon.
Since the only difference between the models will only be wiring, I suspect that the bulk of this thread will be on configuration and use.
I wiggled the Glow2, the pinout for SD2 is:
TP159 D0
TP160 D1
TP161 D2
TP162 D3
TP163 Cmd
TP164 Clk
TP165 /CD
TP165 VDD
TP167 Gnd
The Glow3, while it's labelled, seems to be on SD3, which is not configured.
I'm still looking at this.
Thanks! I look forward learning more about mounting the sdcard and editing fstab etc.
One more question: Does this method have any restriction on the size of the sdcard and how it's formated? Many old(er) android devices with external storage can only take sdcard of size up to 32Gb, and (independent of that) sometimes people are told to format the sdcard using the device itself, but other times we're suppose to format it in advance (fat32? ext4?).
THANKS!
case-sensitive said:
Does this method have any restriction on the size of the sdcard and how it's formated?
Click to expand...
Click to collapse
This is not so much a method as simply putting in an option that they couldn't be bothered with.
I don't have anything bigger than 16GB on hand.
32GB is the limit for SD 2.0 spec.
Most of the 4GB to 16 GB cards that I have tried are SD 3.0 spec.
You can see this with mmcinfo in uboot.
Formatting things VFAT is only useful if you want to use UMS.
I wouldn't recommend that, VFAT is old and stupid and there are issues with timezones on timestamps.
ext2 is kind of the logical choice.
mkfs.ext2 is included in busybox for formatting.
TLDR: This works on the Glow2 & Glow4 relatively easily.
On the Glow3 you'd need to sacrifice the WiFi to make it work. This works on the Glow3, but you need a modified kernel and a hwcfg change.
http://www.temblast.com/blogs/glow2/blog.htm
http://www.temblast.com/blogs/glow3/blog.htm
http://www.temblast.com/blogs/glow4/blog.htm
Apparently there is already a default place for external SD cards: /mnt/media_rw/extsd
This has a link from /storage/extsd
Since the directory already exists you don't need to modify /init.rc
If you want to use vfat formatted disks and have them hot swappable you don't even have to modify /fstab.E70Q50
My choice is to use an ext2 formatted disk and since it will be internal and not swappable, I don't need or want vold, the volume daemon.
You need to tweak /fstab.E70Q50 (get rid of any line that mentions "extsd").
Code:
/dev/block/mmcblk1p1 /mnt/media_rw/extsd ext2 defaults defaults
You can split the SD card into separate partitions if you want.
You'd have to add some more entries in /fstab.E70Q50 and some mkdirs in /init.rc
For partitioning/formatting cards:
Code:
# busybox fdisk /dev/block/mmcblk1
d [color=red]<-- delete partition[/color]
n [color=red]<-- new partition[/color]
w [color=red]<-- actually write the changes[/color]
#busybox mkfs.ext2 /dev/block/mmcblk1p1
Be very careful when you are talking about mmcblk? and mmcblk?p?
case-sensitive said:
Many old(er) android devices with external storage can only take sdcard of size up to 32Gb...
Click to expand...
Click to collapse
Code:
[email protected]_6sl:/ # df
Filesystem Size Used Free Blksize
...
/mnt/media_rw/extsd 114.4G 20.0K 114.4G 4096
...
[email protected]_6sl:/ # mount
...
/dev/block/mmcblk1p1 /mnt/media_rw/extsd ext2 rw,relatime,errors=continue 0 0
On the Glow2 I ran into a hiccup.
I soldered some 30 gauge wire directly to the micro SD card.
The SD2 is there and fine, but the NtxHwCfg (at least on mine) had to be patched.
Code:
# dd if=/dev/block/mmcblk0 of=/sdcard/hwcfg skip=1024 count=1
This will get you a 512 byte file.
Look at the byte at hex address 0x4f
For the SD card to work this value must be 0x02 (it was 0x00 on mine)
Be very careful modifying the file and writing it back to the internal SD:
Code:
# dd if=/sdcard/hwcfg of=/dev/block/mmcblk0 seek=1024 count=1
Hey! It says "skip" in the first example and "seek" in the second. I warned you!
Well, more sloppiness on NTX/B&N's part.
*.rc files are organized by board names
Usually they shovel the files into the ramdisk.
This means that you have bunches of useless files that aren't used by your hardware.
The Glow2 is a E60QD0 board, the Glow3 is a E60QQ0 board, the Glow4 is a E70Q50 board.
The init.<board>.rc file should load the fstab.<sameboard> file.
On the Glow2 (at least mine) they did sloppy copy/paste and the init.E60QD0.rc loads fstab.E60Q50
I edited init.E60QD0.rc to load fstab.E60QD0
(Then made sure that fstab.E60QD0 had the correct contents.)
Likewise, init.<board>.usb.rc is sloppy.
They don't use the approved syntax of ${ro.serialno}, but instead use $ro.serialno
I get tired of the warnings in the console log.
Also, a lot of redundant junk (the VID/PID stuff can be moved to the "on boot" section).
If you are using a Glow2 and you just installed the 5.0 update and you had previously modified the hwcfg,
then you will have to set it back to the original version to allow the added SD card to work properly.
See: https://forum.xda-developers.com/showpost.php?p=80114208&postcount=623
I had previously said that an SD card and WiFi were not compatible on the Glow3.
It turns out that it's a bit more complicated.
SD2 is the WiFi interface.
SD3 goes to the test points.
The software currently has the WiFi enable/disable switching the SD3 interface, which is wrong.
I've got the hardware itself working
Code:
eBR-1A # mmcinfo
Device: FSL_USDHC
Manufacturer ID: 27
OEM: 5048
Name: SD32G
Tran Speed: 25000000
Rd Block Len: 512
SD version 3.0
Clock: 50000000
High Capacity: Yes
Capacity: 31104958464 Bytes
Bus Width: 4-bit
Boot Partition for boot: No boot partition available
Now I just have to fix the software.
Ok, so I've patched the kernel to make this work on the Glow3.
This also needs a change to the ntxcfg. You can do that with dd or some other tool.
Is anybody ready for this? Do you have the soldering iron warmed up?
Code:
/mnt/media_rw/extsd 28.5G 20.0K 28.5G 4096
I've got to make a version of the image without my stuff in it.
I usually don't like heavily modded images.
The one thing I put in is a rooted adbd.
So, who's ready for the glow3?
You need a new kernel.
If you have access to fastboot you can test drive it with "fastboot boot p1mod.img".
Later you can "fastboot flash boot p1mod.img" to make it permanent.
If you don't (and you're brave and have a good recovery) you can "dd if=p1mod.img of=/dev/block/mmcblk0p1"
You will need to patch the NTX hwcfg.
If this is patched but you are still running the old kernel the WiFi will probably not work, but the glow3 will still be functional.
Code:
# dd if=/dev/block/mmcblk0 skip=1024 count=1 of=/sdcard/hwcfg
[color=red]Use your favorite hex file editor either on of off the glow3 to change address 0x4f from 0x02 to 0x00.
modfile hwcfg 4f 00[/color]
# dd if=/sdcard/hwcfg seek=1024 count=1 of=/dev/block/mmcblk0
If you have access to the u-boot command line you can do it there instead:
Code:
eBR-1A # mmc read 910000 400 1
MMC read: dev # 0, block # 1024, count 1 ... 1 blocks read: OK
eBR-1A # mm.b 91004f
0091004f: 02 ? 00
00910050: 01 ? q
eBR-1A # mmc write 910000 400 1
MMC write: dev # 0, block # 1024, count 1 ... 1 blocks write: OK
eBR-1A #
So, if you get through with all this and reboot it should boot up just fine.
There is a rooted adbd in there so that should not be a problem.
The fstab has been modified to mount your new SD card.
Since that is probably still the original filesystem it will not mount correctly.
You can do an "ls -l /dev/block" and see both mmcblk1 and mmcblk1p1.
You probably noticed that your old /sdcard is empty.
This is an artifact of the fstab not finishing and therefore the nonencrypted is not triggered nor the late_start.
Just do a "start sdcard" and the /sdcard will populate.
So now, just do a "busybox fdisk /dev/block/mmcblk1" to repartition and a "busybox mke2fs /dev/block/mmcblk1p1".
The fstab presumes ext2, a reasonable choice for something used as big storage. If not, just change it.
Reboot and everything should be good.
Good luck.
I've been talking about the NTX hardware configuration, but I don't think that I mentioned or released the utility that I use to dump it.
Availible in the signature, there is NtxHwCfg which can dump or compare NTX configurations.
There is a version for Win32 and one for Android.
http://www.temblast.com/android.htm
It's interesting that the B&N updates don't modify the NTX config.
The Glow2 has version 2.5 vs. the Glow3 with 2.8 vs. the Glow4 with 3.1!
So that means that the u-boots all have to be different.
Code:
C:\>ntxhwcfg hwcfg3 hwcfg4
0b Version 2.8 3.1
0f Size 65 70
10 PCB E60QQ0 (69) E70Q50 (84)
12 AudioCodec No (0) ALC5672 (6)
14 Wifi RTL8189 (8) RTL8723DS (14)
15 BT No (0) RTL8723DS (8)
17 TouchCtrl neonode_v2 (8) ektf2132 (9)
...

Categories

Resources