If anyone else wants to try, this worked for me. The change is not persistent (until we can make a boot image). I'm running the Singapore ROM, btw.
You will need root privs, and a busybox that has mknod built into it. Mine came from z4root, so I now that one works.
Here are the steps. Proceed at your own risk. I can't be responsible if things go wrong (sorry).
1. Get a shell as root (I used adb).
2. cd /dev/msm_camera
3. ls -l
The directory should look like this. DO NOT PROCEED IF YOURS IS DIFFERENT!!!
crw-rw---- system system 245, 5 2011-01-30 08:45 frame1
crw-rw---- system system 245, 4 2011-01-30 08:45 config1
crw-rw---- system system 245, 3 2011-01-30 08:45 control1
crw-rw---- system system 245, 2 2011-01-30 08:45 frame0
crw-rw---- system system 245, 1 2011-01-30 08:45 config0
crw-rw---- system system 245, 0 2011-01-30 08:45 control0
We're going to change the node IDs for devices 0 and 1.
4. rm * (Yes, we're removing the old ones - stop now if you are afraid).
5. busybox mknod frame0 c 245 5
6. busybox mknod frame1 c 245 2
7. busybox mknod config0 c 245 4
8. busybox mknod config1 c 245 1
9. busybox mknod control0 c 245 3
10. busybox mknod control1 c 245 0
11. chown system.system *
12. chmod 660 *
Load up the camera app. If you had no typos, you will see your front cam as primary and back cam as secondary.
The new directory looks like this (your order may be different):
crw-rw---- system system 245, 3 2011-01-30 16:03 control0
crw-rw---- system system 245, 0 2011-01-30 16:03 control1
crw-rw---- system system 245, 4 2011-01-30 16:03 config0
crw-rw---- system system 245, 1 2011-01-30 16:03 config1
crw-rw---- system system 245, 5 2011-01-30 16:03 frame0
crw-rw---- system system 245, 2 2011-01-30 16:03 frame1
GOOD LUCK!! Don't blame me if it doesn't work for you, please.
Enjoy,
-Celtus
PS: I see no reason why this couldn't run from GScript, but I haven't tried it, yet.
Update: GScript confirmed. Runs fine with SU privs.
You will need root privs, and a busybox that has mknod built into it. Mine came from z4root, so I now that one works.
Here are the steps. Proceed at your own risk. I can't be responsible if things go wrong (sorry).
1. Get a shell as root (I used adb).
2. cd /dev/msm_camera
3. ls -l
The directory should look like this. DO NOT PROCEED IF YOURS IS DIFFERENT!!!
crw-rw---- system system 245, 5 2011-01-30 08:45 frame1
crw-rw---- system system 245, 4 2011-01-30 08:45 config1
crw-rw---- system system 245, 3 2011-01-30 08:45 control1
crw-rw---- system system 245, 2 2011-01-30 08:45 frame0
crw-rw---- system system 245, 1 2011-01-30 08:45 config0
crw-rw---- system system 245, 0 2011-01-30 08:45 control0
We're going to change the node IDs for devices 0 and 1.
4. rm * (Yes, we're removing the old ones - stop now if you are afraid).
5. busybox mknod frame0 c 245 5
6. busybox mknod frame1 c 245 2
7. busybox mknod config0 c 245 4
8. busybox mknod config1 c 245 1
9. busybox mknod control0 c 245 3
10. busybox mknod control1 c 245 0
11. chown system.system *
12. chmod 660 *
Load up the camera app. If you had no typos, you will see your front cam as primary and back cam as secondary.
The new directory looks like this (your order may be different):
crw-rw---- system system 245, 3 2011-01-30 16:03 control0
crw-rw---- system system 245, 0 2011-01-30 16:03 control1
crw-rw---- system system 245, 4 2011-01-30 16:03 config0
crw-rw---- system system 245, 1 2011-01-30 16:03 config1
crw-rw---- system system 245, 5 2011-01-30 16:03 frame0
crw-rw---- system system 245, 2 2011-01-30 16:03 frame1
GOOD LUCK!! Don't blame me if it doesn't work for you, please.
Enjoy,
-Celtus
PS: I see no reason why this couldn't run from GScript, but I haven't tried it, yet.
Update: GScript confirmed. Runs fine with SU privs.
Last edited: