PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   HTC Touch Pro (http://forum.ppcgeeks.com/forumdisplay.php?f=63)
-   -   Linux/Android on CDMA Touch Pro -- Now working on Verizon! And with GPS! (http://forum.ppcgeeks.com/showthread.php?t=104276)

peterm20 06-12-2010 12:20 PM

Re: Linux/Android on CDMA Touch Pro -- Now working on Verizon! And with GPS!
 
Quote:

Originally Posted by makkonen (Post 1810699)
I've got commit access to the rootfs, so I can push it upstream... but I'd like to get the rest of the issues sorted before I do. (Perhaps I'm a little too proud of my generally clean commits. :-))

if you connect with adb during the bootanimation, chown to 1002 (or 1002:1002) works... I don't know at which point that change is made, and if it's sometime while the init script is running (in which case we can just change the order). Moving the bit about dbus.conf down to the bottom of the file might've worked for me last night -- or I might've just missed the error message and forgot to delete the cache folder, so I just thought it worked. I was a bit tired.

I Can take a look at it when I get home I don't have my TP with me right now. Maybe you're right the order might make a difference. But I don't know if the order is important or not. Maybe busybox is just being stupid when running the script vs adb via bash/sh

On babijoee's initial fix commit it gives a error on his too. Its odd because it should be able to change the owner to 1002 with out that user being known. I do it on my linux/ubuntu system all the time, i have a script that patches the squashfs perms before i make a new one and i don't have users 1003 1004 etc

scottericsonon 06-12-2010 12:33 PM

Re: Linux/Android on CDMA Touch Pro -- Now working on Verizon! And with GPS!
 
the latest "all in one" build spits this out when i run the haret:

http://img.photobucket.com/albums/v2...n/IMG_0171.jpg

if i click "run" it kicks this one up

http://img.photobucket.com/albums/v2...n/IMG_0173.jpg

HOWEVER if i first run the build from the older build (from 3-31) and the merge the new andboot folder (like the loading X workaround) it runs great

Flak 06-12-2010 12:53 PM

Re: Linux/Android on CDMA Touch Pro -- Now working on Verizon! And with GPS!
 
It looks like the new AIO doesn't have a startup config in the root of the andboot folder. Moved the raph800 one over and was able to get past the errors above.

sfhub 06-12-2010 01:02 PM

Re: Linux/Android on CDMA Touch Pro -- Now working on Verizon! And with GPS!
 
1 Attachment(s)
Quote:

Originally Posted by makkonen (Post 1810699)
I've got commit access to the rootfs, so I can push it upstream... but I'd like to get the rest of the issues sorted before I do. (Perhaps I'm a little too proud of my generally clean commits. :-))

if you connect with adb during the bootanimation, chown to 1002 (or 1002:1002) works... I don't know at which point that change is made, and if it's sometime while the init script is running (in which case we can just change the order). Moving the bit about dbus.conf down to the bottom of the file might've worked for me last night -- or I might've just missed the error message and forgot to delete the cache folder, so I just thought it worked. I was a bit tired.

I figured out the root cause of the problems and got rid of all the errors. All the other "fixes" are for red herrings.

The real cause of the problem is "/system/bin" is placed in front of "/bin" in the PATH. The versions of many commands in /system/bin appear to be restricted versions which don't accept common options. This problem was exacerbated when people started making changes to the init script *without* using the full path of commands, ie "chown" instead of "/bin/chown". Early on in the init script, it seems folks used the full path, but that practice died off later on. I considered changing every command to be full path, but there were too many lines which would be changed. I figured that should be left for the script maintainer should they so choose.

Instead, the change I made was to adjust the PATH early on in the script to place "/bin" in front of "/system/bin" and then at the end of the script, adjust it back to what it was before, in case init.android or something later on actually required the PATH to be in that order but didn't explicitly set it that way.

I also proved the chmod/chown of /etc/dbus.conf was a red herring by removing those commands completely from the init script. I had previously verified that the permissions and ownership in system.sqfs were *already* 440 and 1002:1002 respectively, and would be preserved by the "cp -a", so how could the "fix" of making a change, that was already there, work. This led me to investigate the actual cause of the problem.

Anyway, here is the updated rootfs.img. Check it out and see if all your errors go away. I tested with latest kernel/modules (6/6/2010), latest initrd (6/11/2010), almost latest rootfs (6/11/2010), and almost latest AOSP (5/31/2010). Prior to testing, I deleted data.img and /sdcard/cache. No errors on the console and it boots straight into Android initial config.

sfhub 06-12-2010 01:06 PM

Re: Linux/Android on CDMA Touch Pro -- Now working on Verizon! And with GPS!
 
1 Attachment(s)
Here is the context diff of the changes I made and tested.

Code:

*** init-orig Sat Jun 12 08:41:42 2010
--- init-fix Sat Jun 12 09:30:39 2010
***************
*** 7,13 ****
 
  /bin/mount -o remount,rw / /
 
! PATH=/sbin:/system/sbin:/system/bin:/bin:/system/xbin:/system/xbin/bb:/data/local/bin
 
  /bin/echo "Rootfs loaded."
 
--- 7,20 ----
 
  /bin/mount -o remount,rw / /
 
! # Looping X animation fix
! # change PATH to put /bin in front of /system/bin to fix looping X animation
! # bug. /system/bin versions of some commands were being run which appear to
! # accept restricted options causing commands to fail and therefore not setup
! # the system properly.  User would see errors on the console like
! # "no such user '-R'" or "no such user '1000:1000'"
! #
! PATH=/sbin:/bin:/system/sbin:/system/bin:/system/xbin:/system/xbin/bb:/data/local/bin
 
  /bin/echo "Rootfs loaded."
 
***************
*** 156,167 ****
  cp -a /system/etc/* /etc
  cp -ar /init.etc/* /etc/
 
- #Possible fix for looping animation. stinebd/gm112
- #First push by babijoee :)
- chown 1002:1002 /etc/dbus.conf
- chmod 440 /etc/dbus.conf
-
-
  LCDDENSITY=`/bin/grep -o "lcd.density=.*" /proc/cmdline | /bin/sed -e "s/.*lcd.density=//g" -e "s/ .*//g"`
 
  if [ "$LCDDENSITY" != "" ] ; then
--- 163,168 ----
***************
*** 513,516 ****
--- 514,524 ----
  mknod /dev/msm_camera/frame0 c 250 2
  chmod a+s /bin/pppd
 
+ # Looping X animation fix
+ # Change PATH back to original in case the change is required for init.android
+ # whether for security purposes or just for it to run properly.  See earlier
+ # change above.
+ #
+ PATH=/sbin:/system/sbin:/system/bin:/bin:/system/xbin:/system/xbin/bb:/data/local/bin
+
  exec /init.android


scottericsonon 06-12-2010 01:14 PM

Re: Linux/Android on CDMA Touch Pro -- Now working on Verizon! And with GPS!
 
Quote:

Originally Posted by Flak (Post 1810769)
It looks like the new AIO doesn't have a startup config in the root of the andboot folder. Moved the raph800 one over and was able to get past the errors above.

yeah that fixed it......

rookie mistake on my part

Overmann 06-12-2010 01:24 PM

Re: Linux/Android on CDMA Touch Pro -- Now working on Verizon! And with GPS!
 
The latest AIO package is quite nice. On the Verizon Touch Pro it now has much more responsive performance than before. Still hiccuppy, but not as bad as the earlier few tries. It's almost useable :P

Deltatristar500 06-12-2010 01:33 PM

Re: Linux/Android on CDMA Touch Pro -- Now working on Verizon! And with GPS!
 
What is the best free calendar widget for the android called in everyone opinion? I have searched the market can can locate a nice one.

peterm20 06-12-2010 02:07 PM

Re: Linux/Android on CDMA Touch Pro -- Now working on Verizon! And with GPS!
 
Quote:

Originally Posted by sfhub (Post 1810782)
Here is the context diff of the changes I made and tested.

Code:

*** init-orig Sat Jun 12 08:41:42 2010
--- init-fix Sat Jun 12 09:30:39 2010
***************
*** 7,13 ****
 
  /bin/mount -o remount,rw / /
 
! PATH=/sbin:/system/sbin:/system/bin:/bin:/system/xbin:/system/xbin/bb:/data/local/bin
 
  /bin/echo "Rootfs loaded."
 
--- 7,20 ----
 
  /bin/mount -o remount,rw / /
 
! # Looping X animation fix
! # change PATH to put /bin in front of /system/bin to fix looping X animation
! # bug. /system/bin versions of some commands were being run which appear to
! # accept restricted options causing commands to fail and therefore not setup
! # the system properly.  User would see errors on the console like
! # "no such user '-R'" or "no such user '1000:1000'"
! #
! PATH=/sbin:/bin:/system/sbin:/system/bin:/system/xbin:/system/xbin/bb:/data/local/bin
 
  /bin/echo "Rootfs loaded."
 
***************
*** 156,167 ****
  cp -a /system/etc/* /etc
  cp -ar /init.etc/* /etc/
 
- #Possible fix for looping animation. stinebd/gm112
- #First push by babijoee :)
- chown 1002:1002 /etc/dbus.conf
- chmod 440 /etc/dbus.conf
-
-
  LCDDENSITY=`/bin/grep -o "lcd.density=.*" /proc/cmdline | /bin/sed -e "s/.*lcd.density=//g" -e "s/ .*//g"`
 
  if [ "$LCDDENSITY" != "" ] ; then
--- 163,168 ----
***************
*** 513,516 ****
--- 514,524 ----
  mknod /dev/msm_camera/frame0 c 250 2
  chmod a+s /bin/pppd
 
+ # Looping X animation fix
+ # Change PATH back to original in case the change is required for init.android
+ # whether for security purposes or just for it to run properly.  See earlier
+ # change above.
+ #
+ PATH=/sbin:/system/sbin:/system/bin:/bin:/system/xbin:/system/xbin/bb:/data/local/bin
+
  exec /init.android


And that is why i support open source over anything. I was getting there to figure out why but first i was trying to get it to work, good find man. you should start working on the camera.

So the restricted commands is why chown wasn't accepting the UID of a nonexistant user then?

Flak 06-12-2010 04:37 PM

Re: Linux/Android on CDMA Touch Pro -- Now working on Verizon! And with GPS!
 
The latest AIO plus sfhubs rootfs fix has android working fully for me finally.


All times are GMT -4. The time now is 10:44 PM.

Powered by vBulletin® ©2000 - 2025, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com


Content Relevant URLs by vBSEO 3.6.0