guardianproject / lildebi

UNMAINTAINED please adopt! we can no longer maintain this
https://guardianproject.info/code
GNU General Public License v3.0
226 stars 55 forks source link

install not working on Galaxy Nexus #23

Closed SteMo closed 11 years ago

SteMo commented 12 years ago

Hi all,

I'm trying to setup Debian on my rooted Galaxy Nexus with Android 4.1.1 using lildebi. I built it successfully and pushed it on my phone. Next, i started lildebi app and wanted to download and install debian - no success. Hence, I downloaded the image and pushed it on the SD card. Now, when I push the button "Configure Image" I get the output "Unknown id: sh". I attached my ddms log too:

08-07 13:28:56.799: E/su(12776): Unknown id: sh 08-07 13:28:56.806: I/LilDebi(12063): cd /data/data/info.guardianproject.lildebi/app_bin 08-07 13:28:56.806: E/LilDebi(12063): Error!!! 08-07 13:28:56.806: E/LilDebi(12063): java.io.IOException: write failed: EPIPE (Broken pipe) 08-07 13:28:56.806: E/LilDebi(12063): at libcore.io.IoBridge.write(IoBridge.java:462) 08-07 13:28:56.806: E/LilDebi(12063): at java.io.FileOutputStream.write(FileOutputStream.java:187) 08-07 13:28:56.806: E/LilDebi(12063): at java.io.OutputStream.write(OutputStream.java:82) 08-07 13:28:56.806: E/LilDebi(12063): at info.guardianproject.lildebi.LilDebi.writeCommand(LilDebi.java:196) 08-07 13:28:56.806: E/LilDebi(12063): at info.guardianproject.lildebi.LilDebi$CommandThread.run(LilDebi.java:166) 08-07 13:28:56.806: E/LilDebi(12063): Caused by: libcore.io.ErrnoException: write failed: EPIPE (Broken pipe) 08-07 13:28:56.806: E/LilDebi(12063): at libcore.io.Posix.writeBytes(Native Method) 08-07 13:28:56.806: E/LilDebi(12063): at libcore.io.Posix.write(Posix.java:178) 08-07 13:28:56.806: E/LilDebi(12063): at libcore.io.BlockGuardOs.write(BlockGuardOs.java:191) 08-07 13:28:56.806: E/LilDebi(12063): at libcore.io.IoBridge.write(IoBridge.java:457) 08-07 13:28:56.806: E/LilDebi(12063): ... 4 more

I would appreciate any hints and ideas.

Stephan

eighthave commented 12 years ago

hmm, seems like 4.1 has different 'su' syntax. Could you try replacing all instances of "su - sh" with "su -c sh"

eighthave commented 12 years ago

I just pushed a bunch of changes, including some that directly address this. I even made a binary for easy installation: https://guardianproject.info/builds/LilDebi/

Could you test and report back if it works for you or not?

SteMo commented 12 years ago

Thanks for your quick reply eighthave! Replacing "su - sh" with "su -c sh" for each instance worked for me. The following classes had to be modified: src/info/guardianproject/lildebi/InstallService.java src/info/guardianproject/lildebi/OnBootService.java src/info/guardianproject/lildebi/LilDebi.java I did it before your second post but had no time to respond - I'll check your build tomorrow.

SteMo commented 12 years ago

Your build didn't work for me. I tried to locate the error but didn't succeed, so I captured 2 logs for you:

  1. "Install" via Download: 08-09 10:41:37.760: I/LilDebi(27427): Starting install service 08-09 10:41:37.807: I/LilDebi(27427): writeCommand: cd /data/data/info.guardianproject.lildebi/app_bin 08-09 10:41:37.807: I/LilDebi(27427): writeCommand: ./create-debian-setup.sh /data/data/info.guardianproject.lildebi/app_bin /storage/sdcard0 /storage/sdcard0/debian.img /debian stable http://ftp.us.debian.org/debian/ 600 08-09 10:41:37.807: I/LilDebi(27427): writeCommand: exit 08-09 10:41:37.807: E/su(27721): sudb - Opening database 08-09 10:41:37.807: E/su(27721): sudb - Database opened 08-09 10:41:37.807: E/su(27721): sudb - Database closed 08-09 10:41:37.971: D/AndroidRuntime(27725): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<< 08-09 10:41:37.971: D/AndroidRuntime(27725): CheckJNI is OFF 08-09 10:41:37.979: D/dalvikvm(27725): Trying to load lib libjavacore.so 0x0 08-09 10:41:37.987: D/dalvikvm(27725): Added shared lib libjavacore.so 0x0 08-09 10:41:37.995: D/dalvikvm(27725): Trying to load lib libnativehelper.so 0x0 08-09 10:41:37.995: D/dalvikvm(27725): Added shared lib libnativehelper.so 0x0 08-09 10:41:38.174: D/AndroidRuntime(27725): Calling main entry com.android.commands.am.Am 08-09 10:41:38.198: D/AndroidRuntime(27725): Shutting down VM 08-09 10:41:38.205: I/AndroidRuntime(27725): NOTE: attach of thread 'Binder_3' failed 08-09 10:41:38.205: D/dalvikvm(27725): GC_CONCURRENT freed 103K, 88% free 494K/4096K, paused 1ms+0ms, total 8ms 08-09 10:41:38.205: D/jdwp(27725): Got wake-up signal, bailing out of select 08-09 10:41:38.205: D/dalvikvm(27725): Debugger has detached; object registry had 1 entries 08-09 10:41:38.424: D/su(27721): 10008 info.guardianproject.lildebi executing 0 /data/data/info.guardianproject.lildebi/app_bin/sh using shell /data/data/info.guardianproject.lildebi/app_bin/sh : sh 08-09 10:41:38.424: E/su(27721): exec failed with 2: No such file or directory 08-09 10:41:38.424: I/LilDebi(27427): Done! 08-09 10:41:38.448: I/ActivityManager(308): START {act=android.intent.action.VIEW flg=0x10 cmp=info.guardianproject.lildebi/.LilDebi u=0} from pid 27427
  2. Manually downloading the image, log after clicking "Configure Image": 08-09 11:06:31.487: E/su(28015): sudb - Opening database 08-09 11:06:31.487: E/su(28015): sudb - Database opened 08-09 11:06:31.487: E/su(28015): sudb - Database closed 08-09 11:06:31.495: I/LilDebi(27427): cd /data/data/info.guardianproject.lildebi/app_bin 08-09 11:06:31.495: I/LilDebi(27427): ./configure-downloaded-image.sh /data/data/info.guardianproject.lildebi/app_bin /storage/sdcard0 /storage/sdcard0/debian.img /debian 08-09 11:06:31.612: D/AndroidRuntime(28019): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<< 08-09 11:06:31.612: D/AndroidRuntime(28019): CheckJNI is OFF 08-09 11:06:31.620: D/dalvikvm(28019): Trying to load lib libjavacore.so 0x0 08-09 11:06:31.627: D/dalvikvm(28019): Added shared lib libjavacore.so 0x0 08-09 11:06:31.627: D/dalvikvm(28019): Trying to load lib libnativehelper.so 0x0 08-09 11:06:31.627: D/dalvikvm(28019): Added shared lib libnativehelper.so 0x0 08-09 11:06:31.784: D/AndroidRuntime(28019): Calling main entry com.android.commands.am.Am 08-09 11:06:31.799: D/AndroidRuntime(28019): Shutting down VM 08-09 11:06:31.799: D/dalvikvm(28019): GC_CONCURRENT freed 103K, 88% free 495K/4096K, paused 1ms+1ms, total 4ms 08-09 11:06:31.807: D/jdwp(28019): Got wake-up signal, bailing out of select 08-09 11:06:31.807: D/dalvikvm(28019): Debugger has detached; object registry had 1 entries 08-09 11:06:32.034: D/su(28015): 10008 info.guardianproject.lildebi executing 0 /data/data/info.guardianproject.lildebi/app_bin/sh using shell /data/data/info.guardianproject.lildebi/app_bin/sh : sh 08-09 11:06:32.034: E/su(28015): exec failed with 2: No such file or directory 08-09 11:06:32.034: I/LilDebi(27427): Done!
eighthave commented 12 years ago

I just saw this problem on my friend's Samsung Galaxy S3. If you look further up the log, do you see a Java stacktrace? It should tell you something like: can't unzip "kioskmode". Basically, the assets included in the .apk didn't get unpacked properly, so your app is missing the file that is being executed. I just committed some fixes to try to make the asset unpacking more robust.

eighthave commented 11 years ago

I think this is fixed, please comment and/or reopen this bug if it is not.