since I couldn’t see “cp” in the entered string after execution I entered the command again and executed again. Is that a critical mistake?
After that I did a reboot and launched K9 trying again to store an attachement on my sdcard1.
But it didn’t work: “Anhang konnte nicht auf die sd-Karte gespeichert werden”.
Also I had a few error-messages saying that youtube, google-play dienste an google maps were terminated and so Threema isn’t working any more too!
Now I try to push back the originally pulled platform.xml (I am so glad that I stored it for security reasons…) in order to have my phone working again…
Maybe I try that busybox thing afterwards but I couldn’t find it at the end of the topic that you have mentioned.
Do you mean that app http://busybox.net/downloads/busybox-1.24.1.tar.bz2 ???
Can my phone install such a file? I don’t use google play any more.
I see. I guess the problem with that approach also was that - what we are trying to solve - you have no rights to write to the SD.
However, if you still have the mail in K9, just save it to the default directory, which for me is /storage/sdcard0/Download - which is just the regular Download folder on the internal storage. Then you could take the file from there (or wherever else K9 is saving your file to; you would then just need to change the file location in the cp command below).
So after storing the file there, the steps would be:
E:\ProgrammeAuf_E\Kommunikation\Minimal ADB and Fastboot>adb shell
shell@FP2: su
root@FP2: mount -o rw,remount /system
root@FP2: cp /storage/sdcard0/Download/platform.xml /system/etc/permissions/platform.xml
About busy box: there are several apps that provide busy box. I currently use this one.
Many apps that need root rights actually also need a busy box installed. Basically it brings many features from a linux terminal (small programs, like vi, wget etc.) onto an Android device. In this case, vi is the key fetaure (a simple text editor for the terminal).
This would work like this:
adb shell
su
mount -o rw,remount /system
vi /system/etc/permissions/platform.xml
edit the file as suggested above and exit vi by typing
First of all I want my phone to work again.
Therefore I tried to repush the originally pulled platform.xml like this:
So that didn’t work. I thought to manually erase the platform-file on my sdcard hoping that the push would work afterwards. But there insn’t any any more! Also amaze doesn’t show sdcard0 any more. Giving root to amaze it shows me at least the root.
So how do I get my phone working again ak how do I get back the original platform.xml?
Are you sure the original platform.xml is gone from the phone?
The adb pull command should only have copied the file to the computer, but not cut it.
In any way, we’ll get the modified version to the right place
I am just not sure what happens if the platform.xml is missing, i.e. where else you could push the file to, since I think it contains necessary information on how to mount some drives.
Actually, I just figured out that with Amaze it is possible to edit the files in place
So the easiest thing would be to point Amaze to /system/etc/permissions, mark the platform.xml, click “open with”, and choose the Amaze text editor. Then you can edit the file easily there!
In case you have lost the file, you can also point Amaze to /system/etc/permissions and create a new platform.xml file (You can copy the content from the platform.xml you have edited).
Haven’t figured that earlier, but I guess that it might be the simplest solution. Just make sure that you have granted superuser rights to Amaze.
If the screenshot above shows the content of the file in /system/etc/permissions then you’ll anyway need to replace the whole file
In that case, just mark all, delete, copy all from my file and paste it. That should be sufficient.
I’d really like to do that. But I got no idea how to get your file into my phone. Tomorrow I’ll try the push for the last time. If that doesn’t work again I’ll try a factory reset. Will that make my phone work again?
If you use the amaze editor you won’t need to copy the file to the phone - that is, if you still can use your web browser. You only would need to be able to open the file and copy it’s content to replace the content of the corrupted file.
I am not sure though if a factory reset would do it, since to my understanding it only clears the /data partition, but the corrupted file sits in the /system partition.
Thanks for the information. Unfortunately the tint browser doesn’t work any more since the google services don’t run any more. So my only chance would be to write the file manually using your file that I downloaded.
Yes, it seems to be a bit tricky, but there are still a couple of possibilities.
Writing the file by hand would be one, but it’s quite some text to copy by hand, with the risk of making mistakes. However, if you’d just write enough by hand to mount one sdcard, you could push the file there and copy it into the right location.
Are any apps still running, or what apps do not run?
I was just thinking that if basically some apps can still run, it might be worth trying to install busy box via adb, which gives you the possibility to use either wget to download files from the internet (right to the location you want them to be), as well as vi to edit files through the terminal.
I would send the text of the originally pulled and “working” platform.xml via sms in small pieces.
Will that work?
What about the greater space between parts of strings. Is it important how much space there is?
I’ll upload the whole file so that you can see it.
Could you tell me, which parts are not necessary? So I don’t need 30 sms…
OK, upload impossible. So here is the content:
<?xml version="1.0" encoding="utf-8"?>
<!-- ================================================================== -->
<!-- ================================================================== -->
<!-- ================================================================== -->
<!-- The following tags are associating low-level group IDs with
permission names. By specifying such a mapping, you are saying
that any application process granted the given permission will
also be running with the given group ID attached to its process,
so it can perform any filesystem (read, write, execute) operations
allowed for that group. -->
<permission name="android.permission.BLUETOOTH_ADMIN" >
<group gid="net_bt_admin" />
</permission>
<permission name="android.permission.BLUETOOTH" >
<group gid="net_bt" />
</permission>
<permission name="android.permission.BLUETOOTH_STACK" >
<group gid="net_bt_stack" />
</permission>
<permission name="android.permission.NET_TUNNELING" >
<group gid="vpn" />
</permission>
<permission name="android.permission.INTERNET" >
<group gid="inet" />
</permission>
<permission name="android.permission.READ_LOGS" >
<group gid="log" />
</permission>
<permission name="android.permission.READ_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
</permission>
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
</permission>
<permission name="android.permission.ACCESS_ALL_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="sdcard_all" />
</permission>
<permission name="android.permission.WRITE_MEDIA_STORAGE" >
<group gid="media_rw" />
</permission>
<permission name="android.permission.ACCESS_MTP" >
<group gid="mtp" />
</permission>
<permission name="android.permission.NET_ADMIN" >
<group gid="net_admin" />
</permission>
<!-- The group that /cache belongs to, linked to the permission
set on the applications that can access /cache -->
<permission name="android.permission.ACCESS_CACHE_FILESYSTEM" >
<group gid="cache" />
</permission>
<!-- RW permissions to any system resources owned by group 'diag'.
This is for carrier and manufacture diagnostics tools that must be
installable from the framework. Be careful. -->
<permission name="android.permission.DIAGNOSTIC" >
<group gid="input" />
<group gid="diag" />
</permission>
<!-- Group that can read detailed network usage statistics -->
<permission name="android.permission.READ_NETWORK_USAGE_HISTORY">
<group gid="net_bw_stats" />
</permission>
<!-- Group that can modify how network statistics are accounted -->
<permission name="android.permission.MODIFY_NETWORK_ACCOUNTING">
<group gid="net_bw_acct" />
</permission>
<permission name="android.permission.LOOP_RADIO" >
<group gid="loop_radio" />
</permission>
<!-- Hotword training apps sometimes need a GID to talk with low-level
hardware; give them audio for now until full HAL support is added. -->
<permission name="android.permission.MANAGE_VOICE_KEYPHRASES">
<group gid="audio" />
</permission>
<permission name="android.permission.ACCESS_FM_RADIO" >
<group gid="media" />
</permission>
<!-- ================================================================== -->
<!-- ================================================================== -->
<!-- ================================================================== -->
<!-- The following tags are assigning high-level permissions to specific
user IDs. These are used to allow specific core system users to
perform the given operations with the higher-level framework. For
example, we give a wide variety of permissions to the shell user
since that is the user the adb shell runs under and developers and
others should have a fairly open environment in which to
interact with the system. -->
<assign-permission name="android.permission.MODIFY_AUDIO_SETTINGS" uid="media" />
<assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="media" />
<assign-permission name="android.permission.WAKE_LOCK" uid="media" />
<assign-permission name="android.permission.UPDATE_DEVICE_STATS" uid="media" />
<assign-permission name="android.permission.UPDATE_APP_OPS_STATS" uid="media" />
<assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="graphics" />
<!-- This is a list of all the libraries available for application
code to link against. -->
<library name="android.test.runner"
file="/system/framework/android.test.runner.jar" />
<library name="javax.obex"
file="/system/framework/javax.obex.jar"/>
<library name="javax.btobex"
file="/system/framework/javax.btobex.jar"/>
<!-- These are the standard packages that are white-listed to always have internet
access while in power save mode, even if they aren't in the foreground. -->
<allow-in-power-save package="com.android.providers.downloads" />