[Q] Set_Perm failed on SU Binary. - Xperia Play Q&A, Help & Troubleshooting

I've been having a little problem for which I couldn't fix with 2 hours of work on Atomic GB 7.1 B2 recently.
I keep getting Status 7 error (Set_perm failed, no such file or directory) on the SU binaries when they are clearly there.
I've tried the following.
- Rewriting the entire updater-script
- Changing my SU binary in system/bin
- Adding my binary to /xbin instead and symlinking the other way
- Having both copies of the binary (without symlinking of course) in /bin and /xbin, both give this error.
- Using different SU apps and binaries.
- Even using existing updater-scripts and simple ones.
Script: (Where it gives Status 7)
Code:
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 06755, "/system/bin/su");
symlink("/system/bin/su", "/system/xbin/su");
Log:
Code:
minzip: Extracted file "/system/xbin/busybox"
minzip: Extracted file "/system/xbin/daemonsu"
minzip: Extracted file "/system/xbin/dexdump"
minzip: Extracted file "/system/xbin/entro"
minzip: Extracted file "/system/xbin/openvpn"
minzip: Extracted file "/system/xbin/rngd"
minzip: Extracted file "/system/xbin/sqlite3"
minzip: Extracted file "/system/xbin/su"
minzip: Extracted file "/system/xbin/zipalign"
about to run program [/tmp/installbusybox] with 1 args
set_perm: chown of /system/xbin/su to 0 0 failed: No such file or directory
set_perm: chmod of /system/xbin/su to 6755 failed: No such file or directory
script aborted: set_perm: some changes failed
set_perm: some changes failed
E:Error in /sdcard/Extracted/ATGB r3.zip
Edit : I might just aswell release without SU and provide it as another zip for now.
Edit 2 : I fixed it. Turns out the problem was caused somehow by my update-binary.
Request thread lock.

Related

[Q] debdroid and calkulins v1.2 fc18

I am trying to get debdroid to start debian squeeze
The linux.img is in /sdcard/debdroid
After deploy from apk, no vnc or ssh so attempt from term
Term output:
Code:
$ export PATH=/data/local/bin:$PATH
$ su
# ash
~ # sh /system/bin/debdroid
Initializing chroot filesystem
mkdir: can't create directory '$/mnt/mnt/android': No such file or directory
mount: Invalid argument
Mounting proc, sysfs, dev, devpts
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
/sdcard/debdroid/share/ mounted to /mnt/share
Native Filesystem mounted to /mnt/android
Setting up DNS and Networking
/system/bin/debdroid: line 70: can't create /data/local/debdroid/etc/resolv.conf: nonexistent directory
/system/bin/debdroid: line 70: can't create /data/local/debdroid/etc/resolv.conf: nonexistent directory
/system/bin/debdroid: line 70: can't create /data/local/debdroid/etc/hosts: nonexistent directory
/system/bin/debdroid: line 70: can't create /data/local/debdroid/etc/hostname: nonexistent directory
Debdroid deployed succesfully, opening chroot.
mount: No such file or directory
chroot: can't execute 'bash': No such file or directory
chroot: can't execute '/bin/bash': No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: Invalid argument
Exiting chroot
Filesystem unmounted
~ #
I dont have bash, is this the problem? Why isnt bash with busybox?
Shouldnt ash work?
BusyBox v1.19.2-cm71 static (2011-10-06 22:09 +0200) multi-call binary.
which zip and image?
You should really post this in the developers debdroid forum.
Which flashable zip and image did you download?
not enough posts
I cant post in dev, im too new.
Here are links to the zip and .gz that I dl'd.
I couldnt even post links. gititbit.ch/ ddba3
I couldnt even post links. gititbit.ch/ ddb4
rename or expand, bash for young
Did you expand the .gz to /sdcard/debdroid and name it linux.img or rename the .gz to linux.img?
not sure how thats supposed to work.
I see that bash is avail for the Young. Not sure why its not in calkulins rom...
Renamed the .gz
First i tried expanding it using estrongs fm. It gave the error "file size mismatch" and the resultant file was only 3.75G. I figured this was not the right way to do it and ended up just renaming the .gz to linux.img. Pretty sure thats how its supposed to go.
Maybe calkulin will include bash in his next rom.
post the output of debshell
post the output of debshell
debshell output
#
#
#
#
#
#
#
#
# sh debshell
init: must be run as PID 1
debshell: line 17: can't create /data/local/debdroid/etc/hostname: nonexistent directory
debshell: line 18: syntax error: unexpected "}"
#
#
#
You cannot simply rename the .gz to .img. Extract it on a computer then move it over to your sdcard as /sdcard/debdroid/linux.img. If ash is not working - bash is required because of the way functions are called in the script, however this should solve your issue once you extract the .img from the compressed download.

[Q] Install ROM from scratch (home button & initial setup wizard not working)

Hello all,
I was testing some nightly builds of cyanogenmod 10, and got to a point where I can no longer install a fully functional ROM. Unfortunately I lost all my backups in a faulty SD card, so I cannot go back now.
I'm trying to install CM9 now from the recovery menu of CWM. I install the CM9 ALPHA9 from the zip file, then I install gapps stripped (this includes all factory resets, wipe all and everything). After that, I reboot the phone, wait a few of minutes (1st reboot) and then I'm immediately presented with the home screen.
The problem here is that the initial setup wizard is not shown. Also the home button is not doing anything, and after I set up my google account, I cannot connect to the play store (server error).
I've been struggling with this for a couple of days already, and from some google searches it seems that the gapps is not properly installed for some reason. I checked the available space in /system partition (using adb shell) and I still have 5MB after installing everything.
Here is the log of the recovery.log file (I see some errors here, but they may be "normal"):
Code:
These are the last lines of the ROM install:
minzip: Extracted file "/system/xbin/su"
about to run program [/tmp/backuptool.sh] with 2 args
find: /tmp/addon.d/: No such file or directory
find: /tmp/addon.d/: No such file or directory
find: /tmp/addon.d/: No such file or directory
cp: can't stat '/tmp/addon.d/*': No such file or directory
package_extract_file: no system/bin/modelid_cfg.sh in package
set_perm: chown of /tmp/modelid_cfg.sh to 0 0 failed: No such file or directory
set_perm: chmod of /tmp/modelid_cfg.sh to 777 failed: No such file or directory
about to run program [/tmp/modelid_cfg.sh] with 2 args
run_program: execv failed: No such file or directory
run_program: child exited with status 1
mtd: successfully wrote block at fffffee000000000
mtd: successfully wrote block at fffffee000040000
mtd: successfully wrote block at fffffee000080000
mtd: successfully wrote block at fffffee0000c0000
mtd: successfully wrote block at fffffee000100000
mtd: successfully wrote block at fffffee000140000
mtd: successfully wrote block at fffffee000180000
mtd: successfully wrote block at fffffee0001c0000
mtd: successfully wrote block at fffffee000200000
mtd: successfully wrote block at fffffee000240000
mtd: successfully wrote block at fffffee000280000
wrote boot partition
script result was [/system]
Install from sdcard complete.
Code:
This is the output of the gapps:
-- Installing: /sdcard/cm9/gapps-cfx-jb-20120815-stripped.zip
mtd: successfully wrote block at c7e0400000000
I:Set boot command "boot-recovery"
Finding update package...
I:Update location: /sdcard/cm9/gapps-cfx-jb-20120815-stripped.zip
Opening update package...
Installing update...
about to run program [/sbin/busybox] with 3 args
Google Apps for Android 4.1.1 - 2012-08-10
minzip: Extracted file "/system/addon.d/70-gapps.sh"
Mounting system...minzip: Extracted file "/system/app/ChromeBookmarksSyncAdapter
.apk"
minzip: Extracted file "/system/app/GoogleBackupTransport.apk"
minzip: Extracted file "/system/app/GoogleCalendarSyncAdapter.apk"
minzip: Extracted file "/system/app/GoogleContactsSyncAdapter.apk"
minzip: Extracted file "/system/app/GoogleEars.apk"
Copying files...minzip: Extracted file "/system/app/GoogleFeedback.apk"
minzip: Extracted file "/system/app/GoogleLoginService.apk"
minzip: Extracted file "/system/app/GoogleNowVoiceSearch.apk"
minzip: Extracted file "/system/app/GooglePartnerSetup.apk"
minzip: Extracted file "/system/app/GoogleServicesFramework.apk"
minzip: Extracted file "/system/app/GoogleVoiceSearch.apk"
minzip: Extracted file "/system/app/MediaUploader.apk"
minzip: Extracted file "/system/app/NetworkLocation.apk"
minzip: Extracted file "/system/app/OneTimeInitializer.apk"
minzip: Extracted file "/system/app/Phonesky.apk"
minzip: Extracted file "/system/app/QuickSearchBox.apk"
minzip: Extracted file "/system/app/SetupWizard.apk"
minzip: Extracted file "/system/app/Talk.apk"
minzip: Extracted file "/system/app/Velvet.apk"
minzip: Extracted file "/system/etc/g.prop"
minzip: Extracted file "/system/etc/permissions/com.google.android.maps.xml"
minzip: Extracted file "/system/etc/permissions/com.google.android.media.effects
.xml"
minzip: Extracted file "/system/etc/permissions/com.google.widevine.software.drm
.xml"
minzip: Extracted file "/system/etc/permissions/features.xml"
minzip: Extracted file "/system/framework/com.google.android.maps.jar"
minzip: Extracted file "/system/framework/com.google.android.media.effects.jar"
minzip: Extracted file "/system/framework/com.google.widevine.software.drm.jar"
minzip: Extracted file "/system/lib/libvoicesearch.so"
minzip: Extracted file "/system/lib/libvorbisencoder.so"
Fixing Permissions...
about to run program [/sbin/busybox] with 3 args
Unmounting system...run_program: child terminated by signal 11
script result was [Installation complete!]
Installation complete!
Install from sdcard complete.
Thanks in advance
Whose build did you try to install? Which gapps package did you flash?
Sent from my bowl of jelly!
vbhtt said:
Whose build did you try to install? Which gapps package did you flash?
Sent from my bowl of jelly!
Click to expand...
Click to collapse
The ROM is: cm-9.1.0-CRYPTOMILK-ALPHA9-marvel.zip. I cannot place the URL here because I do not have permission yet, but its from the main cyanogenmod 9 thread in the development forum.
The gapps is: gapps-cfx-jb-20120815-stripped.zip from from the cyanogenmod 10 thread. But I tried a few more gapps from this site, stripped and complete with no success...
I'm confused. In the 1st post you said you were installing cm10, then you say cm9 . If you are actually installing cm9, it will not work if you flash the jb(cm10) gapps.
Sent from my bowl of jelly!
vbhtt said:
I'm confused. In the 1st post you said you were installing cm10, then you say cm9 . If you are actually installing cm9, it will not work if you flash the jb(cm10) gapps.
Sent from my bowl of jelly!
Click to expand...
Click to collapse
Ok, That was probably a bit confusing, and yes, I was trying to install gapps from CM10 in a CM9 ROM (I see now that this is not a good approach).
But actually that was not the problem.
Now, to clear things up, I downloaded the ROM and gaaps from this thread, the second post.
CyanogenMod10-benjamingwynn-20121029.zip
gapps-cfx-jb-20120815-stripped.zip
The strange thing is that when I'm installing gapps, the progress bar goes up to 80% more or less and then stops and the installation is finished. Then, after the restart, I don't even have the play store icon in the menu.
I think many people have reported this issue with ben's cm10, try another cm10 like oliver's, dudeman's or modpunk's
Sent from my bowl of jelly!
vbhtt said:
I think many people have reported this issue with ben's cm10, try another cm10 like oliver's, dudeman's or modpunk's
Sent from my bowl of jelly!
Click to expand...
Click to collapse
I finally was able to install a working ROM
I used CM10 from modpunk and the gapps lite version from the same thread. It's not the latest version, but it works.
Thanks

[Q] Chmod *.xml in cwm 5,0.2.8 failed

Can anybody tell me how I can do a chmod on multiple files of the same type? For example, I had this line in my updater-script:
run_program("/sbin/busybox", "chmod", "0660", "/data/data/*/*.xml");
This script will execute just fine, but the files did not have 0660 permissions. Then I tried:
run_program("/system/xbin/busybox", "chmod", "0660", "/data/data/*/*.xml");
I copied recovery.log to /sdcard/(using recovery's report error) and I read the log. I searched for the line(s) related to that problematic line in the updater-script and this is what it says:
run_program: child exited with status 1
about to run program [sbin/busybox] with 4 args
chmod: /data/data/*/*.xml: No such file or directory
Both scripts(before and after I edited it) gave similar errors.
Can anybody tell me what I did wrong/ what is the correct way to do it? Thanks a lot. I hope I don't have to chmod all the files manually.

[HOW-TO] Converting Motorola XT907 ROMs to update.zip format

Some of my recent development work has involved frequent changes between stock ROMs and custom ROMs on a Droid Razr M, and I quickly grew weary of dealing with RSD Lite and Windows. So I put together a procedure for converting the .xml.zip ROM into an "update.zip" which is flashable via TWRP.
1) Download the .xml.zip file. I used VZW_XT907_4.1.1-9.8.1Q-27-2-4_1FF.xml.zip from here.
2) Unzip the file into a temporary directory.
3) Extract the system.img sparse ext4 filesystem using simg2img from AOSP (or simg2img.py). Note that the Motorola images have an extra header which needs to be removed with "dd":
Code:
dd if=system.img of=simg bs=131072 skip=1
simg2img simg raw.img
sudo mount -o loop raw.img /mnt
If all goes well, you should see the /system contents under /mnt:
Code:
$ ls -l /mnt
total 72
drwxr-xr-x 2 root root 12288 Oct 21 2012 app/
drwxr-xr-x 2 root 2000 8192 Oct 21 2012 bin/
-rw-r--r-- 1 root root 7562 Oct 21 2012 build.prop
drwxr-xr-x 16 root root 4096 Oct 21 2012 etc/
drwxr-xr-x 2 root root 4096 Oct 21 2012 fonts/
drwxr-xr-x 2 root root 4096 Oct 21 2012 framework/
drwxr-xr-x 9 root root 12288 Oct 21 2012 lib/
drwxr-xr-x 4 root root 4096 Oct 21 2012 media/
drwxr-xr-x 3 root root 4096 Oct 21 2012 tts/
drwxr-xr-x 8 root root 4096 Oct 21 2012 usr/
drwxr-xr-x 5 root 2000 4096 Oct 21 2012 vendor/
drwxr-xr-x 2 root 2000 4096 Oct 21 2012 xbin/
4) Make a new directory for your update.zip contents.
A minimal update.zip contains the system/ partition contents, plus three files:
boot.img - kernel image
META-INF/com/google/android/update-binary - I copied this from a CM 10.1 zip
META-INF/com/google/android/updater-script - see below
Copy boot.img (from the .xml.zip file) and update-binary (from another ROM) into the appropriate locations.
5) Create a new updater-script. A bare bones script for XT907 looks like:
Code:
assert(getprop("ro.product.device") == "xt907" || getprop("ro.product.device") == "scorpion_mini");
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
package_extract_dir("system", "/system");
[i][file permissions - see below][/i]
package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
unmount("/system");
6) Fill in the file permissions section.
To generate the file permission commands, I wrote a perl script "dumpperms.pl" which traverses the loopback-mounted /system partition and prints a "set_perm" or "symlink" command for each entry that requires it. This looks something like:
Code:
$ dumpperms.pl /mnt
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm(0, 2000, 0755, "/system/bin");
set_perm(0, 2000, 0755, "/system/bin/ATFWD-daemon");
set_perm(0, 2000, 0755, "/system/bin/RescueServer");
set_perm(0, 2000, 0755, "/system/bin/RescueStarter");
[...]
set_perm(1002, 1002, 0440, "/system/etc/bluetooth/network.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
symlink("/data/misc/audio/wcd9310_anc.bin", "/system/etc/firmware/wcd9310/wcd9310_anc.bin");
symlink("/data/misc/audio/mbhc.bin", "/system/etc/firmware/wcd9310/wcd9310_mbhc.bin");
[...]
The output from this script should be pasted into the permissions section of updater-script.
7) Create the new update.zip file. boot.img, system/, and META-INF/ should be at the top level:
Code:
$ ls
boot.img META-INF/ system/
$ rm -f /tmp/update.zip ; zip -r /tmp/update.zip .
zip warning: name not matched: system/lib/modules/wlan.ko
zip warning: name not matched: system/vendor/firmware
zip warning: name not matched: system/etc/firmware/wcd9310/wcd9310_anc.bin
zip warning: name not matched: system/etc/firmware/wcd9310/wcd9310_mbhc.bin
zip warning: name not matched: system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin
zip warning: name not matched: system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini
adding: boot.img (deflated 49%)
adding: system/ (stored 0%)
adding: system/media/ (stored 0%)
adding: system/media/KnowYourDevice/ (stored 0%)
[...]
The file should now be ready for flashing / sideloading. The provided template does not clear /data or /cache, so that can be done by hand or added to the updater-script.

[Q] Backtrack 5 install isn't working?

So I have done all the steps to installing Backtrack 5 on my SM-T210 correctly, but when i try to boot it up using "bootbt" i get an error like this:
"[email protected]:/ $
130|[email protected]:/ $ cd /storage/extSdCard/BT5
[email protected]:/storage/extSdCard/BT5 $ su
[email protected]:/storage/extSdCard/BT5 # sh bootbt
Loop device exists
open backing file failed: No such file or directory
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
net.ipv4.ip_forward = 1
bootbt[23]: can't create /data/local/mnt/etc/resolv.conf: No such file or directory
bootbt[24]: can't create /data/local/mnt/etc/hosts: No such file or directory
chroot: can't execute '/bin/bash': No such file or directory
Shutting down BackTrack ARM For Xoom
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: Invalid argument
1|[email protected]:/storage/extSdCard/BT5 #"
any suggestions? Im new to android.
http://forum.xda-developers.com/showthread.php?t=1074723
This thread covers installing backtrack on the Xoom tablet. Also implies it can be installed on other devices. Last activity in the thread was in 2012 but there still may be some helpful information.
sent from a buggy xda app by some miracle

Categories

Resources