ADB install problem on SGS3/JB - Android Q&A, Help & Troubleshooting

I'm on SGS 3 (I9300) with freshly installed I9300XXDLIH_I9300VFGDLJ1_VIP and rooted afterwards.
Since I upgraded my phone to Jelly Bean, I can't test/debug any development project on the phone.
The Eclipse APK build passes OK and this is what I get in the step afterwards -- when the APK is tried to be deployed on the phone:
Code:
Installation failed due to invalid APK file!
Please check logcat output for more details.
Launch canceled!
This is what I get when I try installing directly with ADB:
Code:
>adb install -r test.apk
3484 KB/s (1616779 bytes in 0.453s)
pkg: /data/local/tmp/test.apk
Failure [INSTALL_FAILED_INVALID_APK]
I've found some hints that the tmp folder may have invalid permissions, so I have done this:
Code:
chmod 777 /data /data/local /data/local/tmp
With the result:
Code:
[email protected]:/ # ls -ld data data/local data/local/tmp
ls -ld data data/local data/local/tmp
drwxrwxrwx system system 2012-10-23 15:40 data
drwxrwxrwx root root 2012-08-25 10:40 local
drwxrwxrwx shell shell 2012-10-23 16:36 tmp
Eclipse or ADB still refuse to install (any) APK.
If I copy the Eclipse-generated APK to the phone and initiate the install from there, it works OK.
What can I do to fix this? Please help.
FYI, I'm using 20.0.3 Android SDK (and Eclipse 4.2.1).
My system properties:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Update:
Installed SiyahKernel S3-v1.6.8 and w/o any tampering with the settings (e.g. through ExTweak) the problem is solved.
Root cause seems to be UMASK.
- on stock kernel I had 0077
- now on SiyahKernel I have 0000
Still, as can be seen from numerous other threads on the same issue out there, it's very wrong for the stock kernel to cause that problem.

Moved to Android Q&A.

Related

[Q] Need Help

Hi All,
When i push some applications in system/app folder via root explorer. It does not work. I am not able to see those apps in app drawer. Is there any other way to push to those apps ?
thanks in advance.
Regards
Creedy
Make sure you give the files Read/Write permission.
What ever app you push to system/app folder, change their permissions like this with the help of root explorer after enabling read write.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
As you told me, I have changed the permissions but still can't see pushed apps in app drawer. ....
Have you reboot the phone after copying and setting permission?
Can you post the URL you use as reference for doing this?
Off course I have rebooted the phone after setting permissions. Actually I m trying to push default music app by LG. By mistake it was deleted by me. So i want to install it again.
Place the apk on the root of your sdcard. Remount and copy the stuff with these commands:
Code:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /sdcard
cp <filename>.apk /system/app/<filename>.apk
kpbotbot said:
Place the apk on the root of your sdcard. Remount and copy the stuff with these commands:
Code:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /sdcard
cp <filename>.apk /system/app/<filename>.apk
Click to expand...
Click to collapse
what about remount for read after?
I tired it but no luck Music app is not showing. Could you please share Music.apk and Music.odex Files). using cmds can't see music.apk in app folder.
The_ERROR said:
what about remount for read after?
Click to expand...
Click to collapse
I thought he was going to restart anyway
I think there was a similar problem in another thread about this, something about the app not being signed?

[Q] Chmod +x scrip.sh

hi all ,
yesterday i just rooted my Galaxy siii and now i am trying to run Ubuntu on it ,
so for the run script in need the x permission but for some reason i cant change the files permissions , i try the command line
su
chmod +x filename.sh
or
chmod 777 or 775 filsname.sh
it don't give an error but after ls -l see that the file still don't get x permission
and still cant run it i try with 2 terminals and withe the commander program but all of them don't success to give the wright permission to the file !
any ideas ? , i search on the forum and the internet find some threads with other devises but with no answer !
Where is the file? You can't change permissions for files on sdcard
Sent from my GT-I9300 using Tapatalk 2
will i think about that so i try ..
/mnt/exsdcard/ubuntu
after that
/mnt/sdcard/ubuntu
after that
/mnt/sdcard
but didn't work
so where to put it ?
You don't need to change it. You just
su
sh ubuntu.sh
Sent from my GT-I9300 using Tapatalk 2
put it say permission denied ! , even after su !
Yes I have that issue too. Only on s3 not other phones.
My work around was to run it using script manager. Setting the root permission
Sent from my GT-I9300 using Tapatalk 2
i just tried that , didn't work
i tried : like is script :
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
and like is executable
and you can see the root " the green thing in the corner "
http://postimage.org/image/vqg6qaobv/
http://postimage.org/image/xjj3em9ij/
Works fine for me. Did script manager ask for root?
You have to set root on the properties. Also make sure its set as script not executable
Sent from my GT-I9300 using Tapatalk 2
thank you my friend , i found the problem ! , will i install the busy box and i thought that is enough but never run it so when i do it actually install all the binaries that missing ... ,but still your way to run it in root permission help me a lot other wise cant run it on root and that is strange !

Read only File System Problem

Hi everyone,
First of all, I would like to wish Merry Christmas to the Community Members...
Secondly, I am stuck on a very irritating problem: Read Only File System
I Rooted my phone, Flashed CWM 6.0.3.1 a month ago. Since then, I tried various ROMs here and I found this problem in all ROMs I've tried. Basically, I am not able to Change my System Files.
I tried ES File Explorer to overwrite but it says: Permission Denied!
I tried all File manager, but failed!
I tried mount -o remount,rw /system but neither it changed the permissions, nor it gave any error in Terminal.
I used Terminal and tried the chmod command, but it says Read Only file system
I tried to make a Flashable ZIP using this method, but even this doesn't change the files.(No, it does not show any error while flashing the zip through CWM)
Actually, I was trying to overwrite the boot animation, but the thing is that my whole system seems to be Read Only.
So, I would like to ask for help regarding this.
Thank You
Best Regards,
THAKUR
SCREENSHOTS BELOW
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
flashed roms. ..? ehh is your bootloader unlocked...?
second it looks like a root problem . try this method to gain root again (if you're already rooted ,then go to supersu and in settings do permanent unroot) ,it roots your phone in 28~35 seconds ,
http://forum.xda-developers.com/showthread.php?t=2511695
Ok. So the problem was solved on the same time as I posted this thread.
What worked for me:
When I tried mount -o remount,rw /system, I was still not able to Fix permissions through ES File Explorer. Then, When I tried mount -o remount,rw /system 2 times, and then I used the Default File manager(Cyanogen File Manager) to change permissions, it was working.
Ok. So the problem is solved now.
Thread can be marked as SOLVED :good:
Anuj, Thanks though

adb pull gives error "access denied" - How to fix?

All I want to achieve is to pull subfolders ( DCIM etc.pp ) of Android's /data/media folder what successfully got mounted as RW
To access /data partition you need root permission which is adb root
But most devices would refuse to run this command, in which case you need to install adb insecure mode. You can get that from here.
After installing the app switch to insecure mode. Then pull command should work.
Alternatively you can use adb shell to work around it:
Code:
adb shell
su
mkdir /sdcard/media
cp -R /data/media/* /sdcard/media
exit
exit
adb pull /sdcard/media
Notes:
The "*" in "/data/media/*" stands for all, which copies all files in current directory. If you want specific file just replace it with "filename.extension"
The option "-R" in "cp" command stands for recursive which copies directories, and will copy all files in respective directories as well.
Thanks for trying to help: Unfortunately your solutions don't work at all.
FYI:
I use /data/local/tmp for intermediate storage ( permissions: rwxrwxrwx )
I can successfully copy /data/media/<SUBFOLDER> to /data/local/tmp/<SUBFOLDER> ( permissions rw-rw-rw- )
All copied files have permission rw-rw-rw-
When applying ADB PULL on /data/local/tmp/<SUBFOLDER> I still get error "Access denied" even if having additionally set owner of all
files in /data/local/tmp/<SUBFOLDER> to shell.shell and/or root.shell and/or shell.root and/or root.root
It's working fine with me, but I used /sdcard as the copy folder.
Like I said you can only access /data partition with root. You can try the first method mentioned above.
As mentioned none of your suggestions solved the problem.
1, ADB Insecure obviously doesn't work on Android 8+ devices, hence useless
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2. Temporarily copying to /sdcard in my case is useless too, because /sdcard is merely a symlink to /data
So you can't even use pull command on /sdcard partition?
I only found this answer, that may be similar https://android.stackexchange.com/a/213172

General Extend WSA by 428 Linux commands

To my knowledge Windows Subsystem for Android ( WSA ) is not created to run apps from the Amazon store only, but is configured for testing via ADB, will say run Linux commands in an Android shell, too.
WSA ( what at time of this writing is running Android 12 ) has merged Landley's Toybox v0.8.4, a bag of over 200 Linux command line applets - I have not really counted them.
A typical Linux distribution provides 428 command line applets - the SU incorporated. I have uploaded .ZIP ( 263 MB ) what contains them all here to:
428-cmds
MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.
www.mediafire.com
If you are interested in this project, too, then it's on you to download and extract the .ZIP and push the 428 files onto Android, preferredly to /storage/emulated/0/428-cmds, and make them executable.
Example .BAT-file - assumed .ZIP got extracted into D:\428-cmds folder & ADB is installed on PC
Code:
adb connect 127.0.0.1:58526
adb devices
adb shell "cd /sdcard & mkdir -p -m06755 428-cmds 2>/dev/null"
adb push "D:\428-cmds" "/sdcard/428-cmds/"
adb shell "SM='getenforce';setenforce 0;cd /sdcard/428-cmds;CMDS='$(find .-name "*" -maxdepth 1 -type f 2>&1 | grep -i -v denied)';while read x;do chmod 06755 "$x" & chown root:shell "$x";done; << "$CMDS";chcon "$x" u:object_r:su_exec:s0;setenforce "$SM";"
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Note:
The 428 commands provided all are ELF32 binaries, so 32-bit:
That doesn't have to stop you from using them on a x86_64 PC because a 64-bit CPU can handle 32-bit commands.
Hmm... Great Work
I am getting an error on the last command.
/system/bin/sh: here document '$CMDS' unclosed
I tried the method in your toybox thread but it doesn't connect to wsa.
I think it is looking on the wrong port from the looks of the script. I am just trying to get root. I updated my rooted build of wsa and it no longer would load. i have tried different ones making sure to remove the one from the microsoft store first. Installing the one from the microsoft store by installing the amazon store gets wsa working again but without root and without my userdata.vhdx that I backed up. Any help would be appreciated. Thanks

Categories

Resources