Enable or disable apps directly from the filesystem - Android Q&A, Help & Troubleshooting

Hey guys,
last week I disabled some Apps on my rooted OnePlus 5. Today in the morning, I needed to reboot the phone and then it happened. The phone hangs in a boot-loop. While booting, the red cycling OnePlus logo appears. After that I see very short the keys to type my code for the SIM card. Then, again the red cycling OnePlus logo.
Ok, ****... whats happens?
I think I disabled some wrong app. But which? I booted into the TWRP Recovery, start adb shell and have a look.
My thought was to enable all Apps with "pm" (PackageManager), but it isn't working in the TWRP Recovery Terminal:
Code:
CANNOT LINK EXECUTABLE "app_process": cannot locate symbol "_ZN7android14IPCThreadState11setBlockUidEib" referenced by "/system/lib64/libandroid_runtime.so"...
Aborted
I searched for some options to enable or disable an app. But I found only this from user arana1: https://forum.xda-developers.com/showpost.php?p=46287590&postcount=15
I also found a Java exception in /data/system/dropbox. There are many boot failure files:
Code:
/data/system/dropbox # ls -al
..
..
-rw------- 1 system system 1843 Dec 6 18:16 [email protected]_16_09_077.txt
-rw------- 1 system system 1843 Dec 6 18:16 [email protected]_16_19_819.txt
-rw------- 1 system system 1843 Dec 6 18:16 [email protected]_16_30_883.txt
-rw------- 1 system system 1843 Dec 6 18:16 [email protected]_16_41_800.txt
-rw------- 1 system system 1843 Dec 6 18:16 [email protected]_16_52_650.txt
-rw------- 1 system system 1843 Dec 6 18:17 [email protected]_17_03_520.txt
The content of the files are:
Code:
Process: system_server
Subject: SystemServer
Build: OnePlus/OnePlus5/OnePlus5:7.1.1/NMF26X/10171617:user/release-keys
android.util.Log$TerribleFailure: BOOT FAILURE Notifying Location Service running
at android.util.Log.wtf(Log.java:295)
at android.util.Slog.wtf(Slog.java:116)
at com.android.server.SystemServer.reportWtf(SystemServer.java:374)
at com.android.server.SystemServer.-wrap0(SystemServer.java)
at com.android.server.SystemServer$2.run(SystemServer.java:1524)
at com.android.server.am.ActivityManagerService.systemReady(ActivityManagerService.java:14993)
at com.android.server.SystemServer.startOtherServices(SystemServer.java:1446)
at com.android.server.SystemServer.run(SystemServer.java:353)
at com.android.server.SystemServer.main(SystemServer.java:238)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: java.lang.IllegalStateException: Unable to find a fused location provider that is in the system partition with version 0 and signed with the platform certificate. Such a package is
needed to provide a default fused location provider in the event that no other fused location provider has been installed or is currently available. For example, coreOnly boot mode when decry
pting the data partition. The fallback must also be marked coreApp="true" in the manifest
at com.android.server.LocationManagerService.ensureFallbackFusedProviderPresentLocked(LocationManagerService.java:572)
at com.android.server.LocationManagerService.loadProvidersLocked(LocationManagerService.java:620)
at com.android.server.LocationManagerService.systemRunning(LocationManagerService.java:358)
at com.android.server.SystemServer$2.run(SystemServer.java:1522)
... 7 more
There you can see that android? can't find a "fused location provider". I'm to 90% sure that I disabled this app.
I found this, but I don't know how to use this or where it writes something:
https://developer.android.com/refer...ionEnabledSetting(java.lang.String, int, int)
Do you guys know how to enable a app in the /data partition without the package manager "pm"? Maybe editing some files?

I found the solution.
I disabled some app at my old android device with "pm disable <app>" and searched for modified files in the last one minute:
Code:
# find /system -mmin -1
I found this file:
Code:
/data/system/users/0/package-restrictions.xml
Search for the app "com.android.location.fused" in the file and found this line:
Code:
<pkg name="com.android.location.fused" ceDataInode="2101300" enabled="3" enabledCaller="shell:0" />
Deleted the enabled and enabledCaller attribute:
Code:
<pkg name="com.android.location.fused" ceDataInode="2101300" />
Saved the file and successfully rebooted the phone! Yeah!
Thanks to user Marc.2377 at Stackoverflow for the hint to delete this both attributes.

That definitely what i call an autonoumous man

thanks, it also worked for j1m galaxy

Thanks so much!
I've been trying for hours to activate adb during boot before /data decryption and a bunch of other stuff.
You're a hero!

You definitely saved my life!
dickdickerson said:
I found the solution.
I disabled some app at my old android device with "pm disable <app>" and searched for modified files in the last one minute:
Code:
# find /system -mmin -1
I found this file:
Code:
/data/system/users/0/package-restrictions.xml
Search for the app "com.android.location.fused" in the file and found this line:
Code:
<pkg name="com.android.location.fused" ceDataInode="2101300" enabled="3" enabledCaller="shell:0" />
Deleted the enabled and enabledCaller attribute:
Code:
<pkg name="com.android.location.fused" ceDataInode="2101300" />
Saved the file and successfully rebooted the phone! Yeah!
Click to expand...
Click to collapse
Your solution worked like a charm! For my part, the package-restrictions.xml was a little bit different, I had to replace that piece of code:
Code:
<pkg name="com.android.location.fused" ceDataInode="1223">
<disabled-components>
<item name="com.android.location.fused.FusedLocationService" />
</disabled-components>
</pkg>
with this one:
Code:
<pkg name="com.android.location.fused" ceDataInode="1223">
<enabled-components>
<item name="com.android.location.fused.FusedLocationService" />
</enabled-components>
</pkg>
(replaced "disabled-component" node with "enabled-component").
Then that's it. Back to business with all my data kept!
Thanks again!

saved my ass! Xiaomi Redmi Note 7
I disabled the miaccount or micloud services and couldn't log into the phone because of it's inbuild security system.
I had the RPC error trying to reactivate the phone.
This solution worked out like a charm for me. Same steps. Thank you!

dickdickerson said:
I found the solution.
I disabled some app at my old android device with "pm disable <app>" and searched for modified files in the last one minute:
Code:
# find /system -mmin -1
I found this file:
Code:
/data/system/users/0/package-restrictions.xml
Search for the app "com.android.location.fused" in the file and found this line:
Code:
<pkg name="com.android.location.fused" ceDataInode="2101300" enabled="3" enabledCaller="shell:0" />
Deleted the enabled and enabledCaller attribute:
Code:
<pkg name="com.android.location.fused" ceDataInode="2101300" />
Saved the file and successfully rebooted the phone! Yeah!
Thanks to user Marc.2377 at Stackoverflow for the hint to delete this both attributes.
Click to expand...
Click to collapse
Man you saved my ass.
I disabled MI Account (com.xiaomi.account) and got locked out of the device asking to unlock by entering xiaomi account password, but I could not enable by entering the password cause I had the ****ing application disabled.
Respect for you, bruh...

This needs to go in a "so you pwn3d yourself n00b" FAQ somewhere. (Even though I've been doing this for years... )
You saved me an EDL mode flash, thank you sir.

dickdickerson said:
I found the solution.
Click to expand...
Click to collapse
You're a fckn lifesaver. Thanks so much. I really hope someone turns this into a update.zip that can be flashed or a windows script that works on recovery adb

Related

Galaxy S III adb shell error

I was looking up the partition layout of the Galaxy S III while I stumbled upon this problem.
The first time you run a command in 'adb shell' everything is fine, but when you try to run a second command, it just hangs. It doesn't crash, it just hangs.
So, I tried to find out what could be wrong, by doing the following: Instead of going into the shell itself, I just entered a semi-random command 'adb shell mount', which returned the normal result.
Then, I typed 'adb shell' and guess what? It returns a commonly known error: 'error: protocol fault (status 72 6f 6f 74?!)'
The status code is HEX, which translates to: 'error: protocol fault (status root?!)'
So I suppose this has something to do with the fact that my SGS3 is rooted.
I don't feel like unrooting it, but if someone would be so kind to test this on an unrooted SGS3 and report back the results here so we can investigate this further that would be greatly appreciated.
it works without any error.
do you know what to backup which contains kernel and ramdisk ?
Mine is rooted, with Omega Rom V3 and everything works perfect with adb.
Cranck said:
Mine is rooted, with Omega Rom V3 and everything works perfect with adb.
Click to expand...
Click to collapse
Have you tried multiple shell commands? I know adb functions, but it's about using adb shell.
I'm on the stock rom, rooted manually with CF's insecure kernel by the way.
I'm not sure this is related, but there is some very suspicious new functionality in the FactoryTest.apk, called "SysScope". Its some kind of service checking and verifying the authenticity of "something". But I have no idea of what, only that a related java file (ResultCode.class [sysscope.service] contain the following code segment:
Code:
[SIZE=2] arrayOfResultCode[0] = OK;
arrayOfResultCode[1] = ADB_RUNNING_AS_ROOT;
arrayOfResultCode[2] = PARTITION_TAMPERED;
arrayOfResultCode[3] = ROOT_PROCESS_FOUND;
arrayOfResultCode[4] = DANGEROUS_FILE_DETECTED;
arrayOfResultCode[5] = NOT_OFFICIAL_BINARY;
[/SIZE]
Then it looks for SysScope files in the SysScopeVerifyer.class like this:
Code:
[SIZE=2]/data/app/com.sec.android.app.sysscope-1.apk
/data/app/com.sec.android.app.sysscope-2.apk[/SIZE]
I suggest you to back these up, and then replace them, with empty files of the same name, and see what happens.
I have the exact same problem on the GS2, OneX, and OneS. I have no problem shelling into the devices using another system, but on one of my computers I have the same issue. Windows 7 64bit with jdk7 installed.
Also, I enabled adb trace to see what was being returned: set ADB_TRACE=all
-Entering ls three times on the OneX, the first time works correctly
Code:
ls
system/core/adb/commandline.c::stdin_read_thread():stdin_read_thread(): post uni
x_read(fdi=0,...)
system/core/adb/commandline.c::stdin_read_thread():stdin_read_thread(): pre unix
_read(fdi=0,...)
system/core/adb/commandline.c::read_and_dump():read_and_dump(): post adb_read(fd
=101): len=5
ls
system/core/adb/commandline.c::read_and_dump():read_and_dump(): pre adb_read(fd=
101)
system/core/adb/commandline.c::read_and_dump():read_and_dump(): post adb_read(fd
=101): len=32
acct
cache
config
cwkeys
d
system/core/adb/commandline.c::read_and_dump():read_and_dump(): pre adb_read(fd=
101)
system/core/adb/commandline.c::read_and_dump():read_and_dump(): post adb_read(fd
=101): len=318
data
default.prop
dev
devlog
etc
firmware_dsps
firmware_q6
firmware_radio
firmware_wcnss
init
init.elite.rc
init.goldfish.rc
init.qcom.rc
init.qcom.sh
init.rc
init.target.rc
init.usb.rc
mnt
proc
root
sbin
sdcard
sys
system
tombstones
ueventd.goldfish.rc
ueventd.rc
vendor
[email protected]:/ $ system/core/adb/commandline.c::read_and_dump():read_and_dump()
: pre adb_read(fd=101)
ls
system/core/adb/commandline.c::stdin_read_thread():stdin_read_thread(): post uni
x_read(fdi=0,...)
system/core/adb/commandline.c::stdin_read_thread():stdin_read_thread(): pre unix
_read(fdi=0,...)
ls
system/core/adb/commandline.c::stdin_read_thread():stdin_read_thread(): post uni
x_read(fdi=0,...)
system/core/adb/commandline.c::stdin_read_thread():stdin_read_thread(): pre unix
_read(fdi=0,...)

com.bn.cloud.svc permission issue: What does a healthy ''packages.xml" look like?

com.bn.cloud.svc permission issue: What does a healthy ''packages.xml" look like?
I'm running a rooted Nook 1.4.3, and somewhere in my customization, I've run into an odd permissions issue.
Main question: Can anyone with a Nook 1.4.3 whose B&N Shop is working paste their /data/system/packages.xml here so I can check mine against it?
Main problem: The B&N Shop can't connect to anything. Basically my device has no access to the B&N cloud.
Looking at the logs, I see this a lot:
Code:
W/ActivityManager( 1294): Unable to start service Intent { act=com.bn.cloud.IRequestHandler }: not found
Looking at logcat while the tablet boots, I see this related section:
Code:
I/PackageManagerService( 1294): /system/app/BnCloudRequestSvc.apk changed; collecting certs
W/PackageManagerService( 1294): Signature mismatch for shared user : SharedUserSetting{40597710 com.bn.cloud/10032}
E/PackageManagerService( 1294): Package com.bn.cloud.svc has no signatures that match those in shared user com.bn.cloud; ignoring!
...
W/PackageManagerService( 1294): Unknown permission com.bn.cloud.EXECUTE_REQUEST in package com.bn.nook.drpreader
W/PackageManagerService( 1294): Unknown permission com.bn.cloud.RECEIVE_NOTIFICATION in package com.bn.nook.drpreader
W/PackageManagerService( 1294): Unknown permission com.bn.cloud.EXECUTE_REQUEST in package com.bn.nook.social
W/PackageManagerService( 1294): Unknown permission com.bn.cloud.EXECUTE_REQUEST in package com.bn.nook.quickstart
W/PackageManagerService( 1294): Unknown permission com.bn.cloud.RECEIVE_NOTIFICATION in package com.bn.nook.quickstart
W/PackageManagerService( 1294): Unknown permission com.bn.cloud.EXECUTE_REQUEST in package com.bn.nook.reader.activities
So my best guess is that I borked something in my packages.xml so PackageManager thinks my 'BnCloudRequestSvc.apk' is wrong and completely disables the cloud service that the shop (and other com.bn.* apps) need.
I've tried wiping my dalvik cache and running 'fix_permissions' from the bootable CWM sdcard I used to root the thing, but still no luck.
I'd love to compare my packages.xml to someone who has a working shop, or hear any other suggestions anyone may have about what may be going wrong here, like why does the Package Manager say "/system/app/BnCloudRequestSvc.apk changed; collecting certs"?
Solved!
I solved this issue by doing the following:
Delete /data/system/packages.xml
Reboot -> This regenerates /data/system/packages.xml (ignore all force-closes, they are expected)
Power off
Power on with CWM SD Card, go into "advanced" and "Fix Permissions" (Built my SD Card using these instructions: http://forum.xda-developers.com/showthread.php?t=1466583)
Reboot
Once it came back up, everything was working great!(*)
(*) One small caveat-> After that last reboot, it came up with the 'Homecatcher" app doing something incredibly weird: It was flickering and I couldn't actually choose a launcher... Thankfully I happened to reorient from portrait to landscape, then back to portrait, and it came out of it and began working just fine.
Now that I have the thing working again, I've compared my prevous "broken" packages.xml to the new working packages.xml, and found that my actual original problem was that I was missing a <packace> section for the com.bn.cloud.svc library.
That wasn't *quite* all...
Noting further steps here I had to take to get everything working again after this issue... escapde.
Removing packages.xml and running 'fix permissions' isn't quite the whole story. I also had to:
Reinstall all local apps to re-request their permissions:
Code:
[in adb shell]:
for app in /data/apps/*.apk; do pm install -r $app; done
Modify the permissions of all existing downloaded books and magazines in /data/media so it matches the new B&N UID:
Code:
[in adb shell]:
busybox ps
... Find the UID that all the com.bn.* apps are running with
... In my case this was '10020', aka 'app_20'
busybox chmod 10020.10020 -R /data/media/Books/*
busybox chmod 10020.10020 -R /data/media/Magazines/*

[CM10.1][For Samsung Galaxy Pocket Neo & Duos][S5310/S5312]

CyanogenMod is an aftermarket firmware for a number of cell phones based on the open-source Android operating system. It offers features not found in the official Android based firmwares of vendors.
Device Tree : https://github.com/dhinesh77/android_device_samsung_corsica
Kernel : https://github.com/dhinesh77/android_kernel_samsung_corsica
[Thanks to Pawitp ]
[Thanks to Alonso1398 ]
What works?
Wi-Fi
Bluetooth
RIL (Calls, SMS, Mobile Data)
Single SIM
Sensors (Accelerometer, Compass,)
Camera (photo + camcorder)
Video playback
Audio
GPS
Everything else not listed under "known issues"
Known Issues
None
=============================================================================
Downloads
Stable version : http://www.4shared.com/folder/jfWbdecP/Corsica.html
CWM : http://www.4shared.com/file/lS99vrFmba/recoverytar.html
Google Apps: http://wiki.cyanogenmod.org/w/Gapps
Beta 2 : http://www.mediafire.com/download/jlxrai4r9aq5g66/cm-10.1-20140606-UNOFFICIAL-corsica.zip
Ril_fix-2 http://d-h.st/Fvb
Changelog : fixed Ril
Beta 1 : http://www.mediafire.com/download/n1n1b6bjtyz40bl/cm-10.1-20140602-UNOFFICIAL-corsica.zip
note: the above cwm alone can capable of flashing the above cm...
=============================================================================
Installation
1. Go to CWM recovery do wipe data/factory reset.
2. Install ROM
3. Install GAPPS
4. Reboot,
============================================================================
Changelog
05/11/2014 - Release of stable version.
Credits:
@pawitp
@Unjustified Dev
@k2wl
@Alonso1398
XDA:DevDB Information
[CM10.1][For Samsung Galaxy Pocket Neo & Duos][S5310/S5312], ROM for the Samsung Galaxy Grand Duos i9082
Contributors
dhinesh77, k2wl, Unjustified Dev , psych.half
ROM OS Version: 4.2.x Jelly Bean
ROM Kernel: Linux 3.0.x
ROM Firmware Required: Latest CWM recovery
Based On: CyanogenMod
Version Information
Status: Stable
Stable Release Date: 2014-11-05
Current Beta Version: 2
Beta Release Date: 2014-05-27
Created 2014-05-27
Last Updated 2014-11-05
Reserved
Moderators please move this thread sorry for posting in wrong area
dhinesh77 said:
Moderators please move this thread sorry for posting in wrong area
Click to expand...
Click to collapse
have u reported tge post ...only then theyl move it
Moved to Misc Dev
dhinesh77 said:
am trying to build cm10.1 for samsung glaxy pocket neo duos... I managed to go upto home screen , but i can see only black screen with force close messages.... i cant go there after....
1. I read your thread from first you mentioned that you have fixed egl, I tried to bing up hardware rendering but i cant do so ,
so far using software reendering
there eror comes "EGL_BAD_PARAMETER, EGL_BAD_DISPLAY " like that i dont know how to fix it...
error log
2. how to fix the force close eror
log when force close appeared
thanks in advance
Edit:
forgot to provide device tree link
https://github.com/dhinesh77/android...amsung_corsica
Click to expand...
Click to collapse
Sorry, didn't saw this post, cause i am not working on that rom. so i ignore posts there.
And looks like you got EGL working.
Upoad your boot.img, build.prop and framework.res.apk somewhere.. i will see if i can fix somethings..
And where is the download link and screenshots ??
psych.half said:
Sorry, didn't saw this post, cause i am not working on that rom. so i ignore posts there.
And looks like you got EGL working.
Upoad your boot.img, build.prop and framework.res.apk somewhere.. i will see if i can fix somethings..
And where is the download link and screenshots ??
Click to expand...
Click to collapse
no prob bro, uploading boot.img , build.prop , framewrok-res.apk soon...
Still internal memory not mounting and also no netwrok or baseband...
i planed to upload after fixing internal meory, thats why didnt uploaded till now....
because of internal meory screenshots are not saving, hence i cant able to post screenshots too
dhinesh77 said:
no prob bro, uploading boot.img , build.prop , framewrok-res.apk soon...
Still internal memory not mounting and also no netwrok or baseband...
i planed to upload after fixing internal meory, thats why didnt uploaded till now....
because of internal meory screenshots are not saving, hence i cant able to post screenshots too
Click to expand...
Click to collapse
internal memory can be easily fixed.... just need to add some lines.. does this phone have external sd too??
it's hard to fix network and baseband without phone..
you can still take screenshots by adb.. :| but leave it.. i understand i have faced the same problem too..
psych.half said:
internal memory can be easily fixed.... just need to add some lines.. does this phone have external sd too??
it's hard to fix network and baseband without phone..
you can still take screenshots by adb.. :| but leave it.. i understand i have faced the same problem too..
Click to expand...
Click to collapse
in file manager it shows internal storage and mount point as stoarge/emulated/ but when i click it shows no file or folder avail.. this error is displayed in screenshts which i have uploaded...
wifi hotspot working but i cant turn on wifi nor buletooth ...
between here is the file you asked
http://www.mediafire.com/?kgf47p2rp337h
dhinesh77 said:
no prob bro, uploading boot.img , build.prop , framewrok-res.apk soon...
Still internal memory not mounting and also no netwrok or baseband...
i planed to upload after fixing internal meory, thats why didnt uploaded till now....
because of internal meory screenshots are not saving, hence i cant able to post screenshots too
Click to expand...
Click to collapse
use DDMS to take screenshot
dhinesh77 said:
in file manager it shows internal storage and mount point as stoarge/emulated/ but when i click it shows no file or folder avail.. this error is displayed in screenshts which i have uploaded...
wifi hotspot working but i cant turn on wifi nor buletooth ...
between here is the file you asked
http://www.mediafire.com/?kgf47p2rp337h
Click to expand...
Click to collapse
okay.. this should probably fix the internal memory... :fingers-crossed: https://www.dropbox.com/s/hb0j2254vp1vuh7/new_boot.img
services looks okay.. check your /system/etc/permissions.. is there.. android.hardware.bluetooth.xml and android.hardware.wifi.xml ??
psych.half said:
okay.. this should probably fix the internal memory... :fingers-crossed: https://www.dropbox.com/s/hb0j2254vp1vuh7/new_boot.img
services looks okay.. check your /system/etc/permissions.. is there.. android.hardware.bluetooth.xml and android.hardware.wifi.xml ??
Click to expand...
Click to collapse
new boot.img doesnt enables internal sd, and permissions xmls are there...
still not working :crying:
cleverior.ipul said:
use DDMS to take screenshot
Click to expand...
Click to collapse
yeah done with asm
dhinesh77 said:
new boot.img doesnt enables internal sd, and permissions xmls are there...
still not working :crying:
Click to expand...
Click to collapse
what;s the output of these commands..
Code:
adb shell ls -l /storage/
and
Code:
adb shell ls -l /storage/emulated
sorry.. can't help much.. but upload a logcat..
psych.half said:
what;s the output of these commands..
Code:
adb shell ls -l /storage/
and
Code:
adb shell ls -l /storage/emulated
sorry.. can't help much.. but upload a logcat..
Click to expand...
Click to collapse
Code:
dr-xr-xr-x root root 2014-05-28 08:34 emulated
lrwxrwxrwx root root 2014-05-28 08:34 sdcard0 -> /storage/emulated/legacy
d---rwxr-x system sdcard_rw 1970-01-01 00:00 sdcard1
[email protected]:~$ adb shell ls -l /storage/emulated
lrwxrwxrwx root root 2014-05-28 08:34 legacy -> /mnt/shell/emulated/0
logcat
http://justpaste.it/fmzb
dhinesh77 said:
Code:
dr-xr-xr-x root root 2014-05-28 08:34 emulated
lrwxrwxrwx root root 2014-05-28 08:34 sdcard0 -> /storage/emulated/legacy
d---rwxr-x system sdcard_rw 1970-01-01 00:00 sdcard1
[email protected]:~$ adb shell ls -l /storage/emulated
lrwxrwxrwx root root 2014-05-28 08:34 legacy -> /mnt/shell/emulated/0
logcat
http://justpaste.it/fmzb
Click to expand...
Click to collapse
the links look okay.. maybe problem in storage_list.xml :|
decompile framework-res.apk and edit /res/xml/storage_list.xml to...
Code:
<?xml version="1.0" encoding="utf-8"?>
<StorageList xmlns:android="http://schemas.android.com/apk/res/android">
<storage
android:mountPoint="/storage/emulated/legacy"
android:storageDescription="@string/storage_internal"
android:primary="true"
android:emulated="true"
android:mtpReserve="100" />
<storage
android:mountPoint="/storage/sdcard1"
android:storageDescription="@string/storage_sd_card"
android:primary="false"
android:removable="true"
android:allowMassStorage="true" />
</StorageList>
---------- Post added at 10:42 AM ---------- Previous post was at 10:25 AM ----------
So you didn't notice these... :|
D/MountService( 1657): got storage path: null description: Internal storage primary: true removable: false emulated: true mtpReserve: 100 allowMassStorage: false maxFileSize: 0
D/TelephonyManager( 1274): No /proc/cmdline exception=java.io.FileNotFoundException: /proc/cmdline: open failed: EACCES (Permission denied)
I/wpa_supplicant( 1906): unknown option -- I
I/wpa_supplicant( 1906): wpa_supplicant v2.0-devel-4.2.2
I/wpa_supplicant( 1906): Copyright (c) 2003-2012, Jouni Malinen <[email protected]> and contributors
I/wpa_supplicant( 1906): This software may be distributed under the terms of the BSD license.
I/wpa_supplicant( 1906): See README for more details.
I/wpa_supplicant( 1906): This product includes software developed by the OpenSSL Project
I/wpa_supplicant( 1906): for use in the OpenSSL Toolkit (http://www.openssl.org/)
I/wpa_supplicant( 1906): usage:
I/wpa_supplicant( 1906): wpa_supplicant [-BddhKLqqstuvW] [-P<pid file>] [-g<global ctrl>]
.....
E/WifiStateMachine( 1657): Failed to start supplicant!
Click to expand...
Click to collapse
mounting can be fixed by changing the storage_list.xml
wifi can be fixed by by correcting that option...
psych.half said:
the links look okay.. maybe problem in storage_list.xml :|
decompile framework-res.apk and edit /res/xml/storage_list.xml to...
Code:
<?xml version="1.0" encoding="utf-8"?>
<StorageList xmlns:android="http://schemas.android.com/apk/res/android">
<storage
android:mountPoint="/storage/emulated/legacy"
android:storageDescription="@string/storage_internal"
android:primary="true"
android:emulated="true"
android:mtpReserve="100" />
<storage
android:mountPoint="/storage/sdcard1"
android:storageDescription="@string/storage_sd_card"
android:primary="false"
android:removable="true"
android:allowMassStorage="true" />
</StorageList>
---------- Post added at 10:42 AM ---------- Previous post was at 10:25 AM ----------
So you didn't notice these... :|
mounting can be fixed by changing the storage_list.xml
wifi can be fixed by by correcting that option...
Click to expand...
Click to collapse
Still internal storage couldnt be mountd, logcat says read only file system,
Between Wifi still no improvements
bluetooth trning on but unable to connect to any devices...
Still no improvements in ril, but dont know how time is synchronising automatically;
VECTUS said:
Moved to Misc Dev
Click to expand...
Click to collapse
thanks , between in main post it saying a rom for grand duos, i cant able to rename that, will you do that for me sir ?
getting could not find socket error for ril... how o fix it , anybody help lease..
Code:
06-05 13:17:40.813 I/RILJ ( 1924): Couldn't find 'rild' socket; retrying after timeout
06-05 13:17:44.807 I/RILJ ( 1924): Couldn't find 'rild' socket; retrying after timeout
06-05 13:17:48.811 I/RILJ ( 1924): Couldn't find 'rild' socket; retrying after timeout
06-05 13:17:52.815 I/RILJ ( 1924): Couldn't find 'rild' socket; retrying after timeout
06-05 13:17:56.809 I/RILJ ( 1924): Couldn't find 'rild' socket; retrying after timeout
06-05 13:18:00.813 E/RILJ ( 1924): Couldn't find 'rild' socket after 8 times, continuing to retry silently
and full log is below
http://pastebin.com/VBrxKhLa
ril issue fixed
@k2wl @psych.half @Unjustified Dev thanks for your support bros

[Q][SOLVED]Writing into ramdisk from init.rc

EDIT: The solution is in post #6.
Hi,
I'm trying to make a kernel modification which would create a file on boot before any partition is mounted. I wrote a simple shell script which tries to create a file in the root directory. The problem is I can't write any file to the / directory from a program or a script called by exec from init.rc. If I run dmesg, I can't find any indication of a problem there. I tried to modify the script to write to the /data directory on post-fs, and that worked, but that is not what I want.
I can't find out where the problem is. Do you have any ideas? Thanks.
simplified init.rc snippet:
Code:
on fs
# some work
exec /sbin/busybox sh /test.sh
# some other work
mount_all /fstab.grouper
# and another work
/test.sh
Code:
#!/sbin/busybox sh
echo "test" > /test
/ mounts as ro pretty early...
try to remount it rw before making files, or change the part of init.rc that mounts it ro.
frantisek.nesveda said:
Hi,
I'm trying to make a kernel modification which would create a file on boot before any partition is mounted. I wrote a simple shell script which tries to create a file in the root directory. The problem is I can't write any file to the / directory from a program or a script called by exec from init.rc. If I run dmesg, I can't find any indication of a problem there. I tried to modify the script to write to the /data directory on post-fs, and that worked, but that is not what I want.
I can't find out where the problem is. Do you have any ideas? Thanks.
simplified init.rc snippet:
Code:
on fs
# some work
exec /sbin/busybox sh /test.sh
# some other work
mount_all /fstab.grouper
# and another work
/test.sh
Code:
#!/sbin/busybox sh
echo "test" > /test
Click to expand...
Click to collapse
I am having the same problem, my script is not called. Did you find the solution?
Khaon said:
I am having the same problem, my script is not called. Did you find the solution?
Click to expand...
Click to collapse
Not yet. But recently I got back to the project where I would use it, so maybe I can take a look again and see if I am any wiser now. I'll try to solve it this evening or tomorrow, I'll be reinstalling my tablet so I'll have a good oportunity. I'll post the results here.
frantisek.nesveda said:
Not yet. But recently I got back to the project where I would use it, so maybe I can take a look again and see if I am any wiser now. I'll try to solve it this evening or tomorrow, I'll be reinstalling my tablet so I'll have a good oportunity. I'll post the results here.
Click to expand...
Click to collapse
That would be great, the only thing I could see is upon booting its permissions are read-only. And chmod 0777 doesn't change its permissions(rootfs is rw)
Khaon said:
That would be great, the only thing I could see is upon booting its permissions are read-only. And chmod 0777 doesn't change its permissions(rootfs is rw)
Click to expand...
Click to collapse
OK, I found the cause of the problem and the solution.
The implementation of the exec command in Android init scripts is missing from the init binary by default - the source looks like this:
Code:
int do_exec(int nargs, char **args)
{
return -1;
}
So there are two options - either write the do_exec function yourself, or use a trick to execute your programs.
Writing it yourself would be probably cleaner, but it would mean compiling the init binary again and not everyone wants to do that, so I'll be using the trick.
The trick is to register your program as a service and then invoke it via the start command.
Example init.rc:
Code:
# service invocation - where you need it
# warning - this will not wait for the finish of the program
start my_awesome_program
.
.
.
# service declaration - along with other declarations at the end of the file
service my_awesome_program /sbin/my_awesome_program
disabled
oneshot
If you want to implement the do_exec function and use the exec command, you can use for example CyanogenMod's implementation.
There may be a third option, but I haven't tested that - you can copy the init binary from a kernel which has the exec command working - I suppose all CM kernels should, but I haven't tried.
It's funny how when you already know the solution, you can find so much info, but when you don't, nothing comes up since you are searching wrong.
frantisek.nesveda said:
OK, I found the cause of the problem and the solution.
The implementation of the exec command in Android init scripts is missing from the init binary by default - the source looks like this:
Code:
int do_exec(int nargs, char **args)
{
return -1;
}
So there are two options - either write the do_exec function yourself, or use a trick to execute your programs.
Writing it yourself would be probably cleaner, but it would mean compiling the init binary again and not everyone wants to do that, so I'll be using the trick.
The trick is to register your program as a service and then invoke it via the start command.
Example init.rc:
Code:
# service invocation - where you need it
start my_awesome_program
.
.
.
# service declaration - along with other declarations at the end of the file
service my_awesome_program /sbin/my_awesome_program
disabled
oneshot
If you want to implement the do_exec function and use the exec command, you can use for example CyanogenMod's implementation.
There may be a third option, but I haven't tested that - you can copy the init binary from a kernel which has the exec command working - I suppose all CM kernels should, but I haven't tried.
It's funny how when you already know the solution, you can find so much info, but when you don't, nothing comes up since you are searching wrong.
Click to expand...
Click to collapse
Oh my, many thanks! So stupid exec always return ;D, wouldn't have thought one sec on checking the implementation of those functions.
Khaon said:
Oh my, many thanks! So stupid exec always return ;D, wouldn't have thought one sec on checking the implementation of those functions.
Click to expand...
Click to collapse
A small warning - starting the program as a service will not wait for the program finish, so its results will not be available immediately after the start call. I learnt this the hard way after a few hours of debugging just now.
I added this info to my previous post too.
frantisek.nesveda said:
A small warning - starting the program as a service will not wait for the program finish, so its results will not be available immediately after the start call. I learnt this the hard way after a few hours of debugging just now.
I added this info to my previous post too.
Click to expand...
Click to collapse
I always use
Code:
class core
user root
in addition to oneshot.
Haven't you com accross SElinux restrictions using busybox? Because I do I need to set permissions.
I have this issue

Security exception: You either need MANAGE_USERS or CREATE_USERS permission to

Hello, I use a Nexus 5 with Android 8.1 (First Ever Android 8.1 for Nexus 5) and I want to get round corners with this command(s):
Code:
adb shell settings put secure sysui_rounded_size x.x
adb shell settings put secure sysui_rounded_content_padding x
adb shell settings put secure sysui_rounded_corner_radius x
I tried this with ADB but nothing happend so I tired it at my phone with "Terminal" (com.android.terminal) and then this error occurred imgur.com/a/aAZYk
To prevent spam on the XDA forums, ALL new users prevented from posting outside links in their messages. After approximately 10 posts, you will be able to post outside links. Thank you for understanding!
Click to expand...
Click to collapse
Thanks to this rule I can not add links. You have to copy/paste, sorry.
I don't know how to manage a user or how to add a user. I need some help. Thanks.
I tried to get a user but I don't get where i can see my USER_ID
Syntax:
Code:
get [--user <USER_ID> | current] NAMESPACE KEY
Retrieve the current value of KEY.

Categories

Resources