File perrmissions on Android 10 box - Android Stick & Console AllWinner based Computers

Hi
I have spent hours trying to fix a problem on my Android TV box and I have gotten nowhere.
The issue is that generic.kl reset to 0 bytes and now whatever I do, I cannot edit the file.
I have set it to read-write 777 and all sorts of combinations. I have set the partition to read-write mounted.
I have used a root explorer to copy and paste a working version of the file over the top, it does not give an error and the file is there, again it is empty at 0 bytes.
I have tried to run a text editor itself as root but SuperSU will not run - saying the SU Binary is occupied. I did a factory reset and the issue is still there. There is no way to do a full flash reset on this model.
No matter what I do, I cannot seem to actually edit or replace this generic.kl file
Any ideas or suggestions?
Cheers

is it a system partition file ? probably the only way for now would be to modify the file before creating a system image for you to flash. I'm not even sure that's a doable thing actually.
no recovery is a PITA

Yeah, the file is in the System partition in the USR folder.
Do you think there is no way to fix this then? I.e. I can never use a physical keyboard with this unit again as the file controls the key mapping..
Scott

devices that start out with android 10 have a read only system partition. if you have the know-how magisk can still create overlays of system files, you'd need to write a module or get one requested from someone.

@Electron2k it might be worth talking to the dev or asking in this thread
https://forum.xda-developers.com/apps/magisk/module-1controller-1-module-to-support-t3865889
if you've created your new file already maybe there's a way to incorporate it into this module to do what you want. I'm not saying they'll change the module for you, but he or she might help to do it yourself.

Hi there, if you can track down the firmware for your box get the img file and extract it.
Locate the generic.kl file from the extracted rom and copy it over using a file manager, remove the null generic file and reboot your device. All should be working then.
##edit ## just noticed you've already tried replacing the file with a filemanager sorry

Electron2k said:
Yeah, the file is in the System partition in the USR folder.
Do you think there is no way to fix this then? I.e. I can never use a physical keyboard with this unit again as the file controls the key mapping..
Scott
Click to expand...
Click to collapse
Pls send the module or the solution if you have it

Related

Help editing "/sys/devices/virtual/switch/hdmi/state"

Hi,
I tried to edit the file "state" in "/sys/devices/virtual/switch/hdmi/" to unlock HDMI checking according to some internet posts I found. The problem is that it won't let me edit the file. I used Root explorer. My phone is rooted.
I also tried using Terminal emulator + Busybox to directly edit the file but it still didn't work. The file can be copied to other directory, and the copied file in the new directory can be edited, but the original file cannot be deleted or edited. When I tried to delete it, the message showed "Operation not permitted".
Any idea? Do I have to use "mount" command ? If so, please suggest. I am new to android and linux.
naiponnoi said:
Hi,
I tried to edit the file "state" in "/sys/devices/virtual/switch/hdmi/" to unlock HDMI checking according to some internet posts I found. The problem is that it won't let me edit the file. I used Root explorer. My phone is rooted.
I also tried using Terminal emulator + Busybox to directly edit the file but it still didn't work. The file can be copied to other directory, and the copied file in the new directory can be edited, but the original file cannot be deleted or edited. When I tried to delete it, the message showed "Operation not permitted".
Any idea? Do I have to use "mount" command ? If so, please suggest. I am new to android and linux.
Click to expand...
Click to collapse
Interested too. I m exactly at the same point, even with sys mounted RW
Hi. Any news oh this? Thanks

[Q] How to Extract data from .Backup file ? - Created with android system recovery

I Backup-ed my Acer tab b1-A71 using android system recovery - Just like CWM.
The file name ends with .Backup, and i wanted to extract some files from it..
How to Extract data from .Backup file ? - Created with android system recovery
looking for the same
reena0307 said:
I Backup-ed my Acer tab b1-A71 using android system recovery - Just like CWM.
The file name ends with .Backup, and i wanted to extract some files from it..
How to Extract data from .Backup file ? - Created with android system recovery
Click to expand...
Click to collapse
me too looking for the same thing ..how to extract from or decompile .backup file which we get thru recovery.
hi loverboyritesh :: i and you are in same position.. but some advaaanced users are here that we are telling rumors and lies.. dont worry bro.. even i'm trying to get solution.. will tel you after geeing one.. Still no one can tell me hoe to extract .BACKUP file..
same
i am looking for how to reinstall .backup myself so i can have my original rom install.
but i have notice my .backup is 700+mb while custom rom is 200+mb
do you know how to?
reena0307 said:
I Backup-ed my Acer tab b1-A71 using android system recovery - Just like CWM.
The file name ends with .Backup, and i wanted to extract some files from it..
How to Extract data from .Backup file ? - Created with android system recovery
Click to expand...
Click to collapse
same here. dunno how to open and extract the files from a .backup file. hoping you know already
siiingkeeet said:
same here. dunno how to open and extract the files from a .backup file. hoping you know already
Click to expand...
Click to collapse
Nope.. Still i'm having that file but no one knew
reena0307 said:
Nope.. Still i'm having that file but no one knew
Click to expand...
Click to collapse
been searching for 5 days now :<
not a single answer found on google and forums
cant even post a new thread yet. just joined
hope someone will drop by this thread
still no solution?
got same problem here
Got a bootloop issue with an ASUS MeMo Pad 7 HD and I've booted in recovery <3e> to make a backup.
I've got a userdata_YYYYMMDD_HHMMSS.backup. I tried opening it with a bunch of tools like unyaffs, abe (Android backup extractor), going live on the file using linux tools (open as 7zip, zip, rar, tar, tar.gz, gz, bz2 , mount as iso, ext4 and so on....)
Still no luck :-/
Only clue is that the file seems compressed. During the backup under recovery, it told me 3600MB to backup and the file userdata_xxxxxxxx_xxxxxx.backup show only 2.61GB
I did this backup 3 time to ensure there were no corruption during the write process from the pad and did again the same "tests" to open the file...Not better.
If any dev' have any clue of the file format, I'd be glad to help
It doesn't seem to be a valid unix img file. Tried mounting it to no avail. When it's restored by the recovery it also extracts the individual files because i fails on one in my case and stops the entire restore... I tried unzipping it, changed extension to ,jar, .tar, .zip, etc., none of them are recognised...amazing for a standard android feature to find so little info about it
Any solution?
I called Alcatel's technical service today and they told me that you can use the backup file only from the phone. Mine gives me the following error when I try to restore it: Error Magic header
If anyone knows how to unpack the backup file I would be more than grateful.
It's a 512 byte header in front of a "tar.gz"
hexdump -C userdata_xxxxxxxx_yyyyyy.backup | less​showed the magical zip header "1f8b0800 00000000" at offset 0x200
So, skipping 512 bytes, the rest can be gunzip | tar
dd if=userdata_xxxxxxxx_yyyyyy.backup bs=512 skip=1 | gunzip -c | tar xv​
Sir ektoric what d u mean on ur post?
Sorry cant understand it..
Can u please d a step by step procedure? Please...pls...plss
Thanks in advance...
Steps?
@ektoric sir im a noob in this... Can u show a step by step procedure?
@killen00 sorry, I assume you have a linux machine (or have access to one). The command is actually all there is to it.
Code:
dd if=userdata_xxxxxxxx_yyyyyy.backup bs=512 skip=1 | gunzip -c | tar xv
If you don't have a linux machine available, might I suggest one of the many distros of your choice, most of which have LiveCDs which you can run without installing.
script for gunzip method
maybe on xda it is common sense, but for me it was necessary to know, that these stock android recovery extracted files can be restored with nandroid custom recovery, if you simply repack them into tar archive.
i put this two command lines in a dirty shell script (extract + repack as tar).
thanks to ektoric figuring out his gunzip method!
edit: notamamasboy's mount method added (but not tested yet). if script not works come back few days later, download again and check version, maybe it has changed meanwhile.
with this you're able to transfer data of non-rooted phone to (rooted) similar one.
this is useful in case touchscreen is broken, you haven't custom recovery installed, usb-debugging is disabled and connecting usb-otg-mouse doesn't work.
tested on my Archos 50 b Oxygen (Mediatek MT6582).
it works for me, feel free to improve, port to busybox and publish. no support. use at own risk.
edit: bckp2cwm.sh is deprecated it is FOR JELLY BEAN ONLY (no selinux support)
a newer (selinux) version bckp2win.sh for TWRP you can find here:
http://forum.xda-developers.com/showthread.php?t=3775129
How did you go about determining the magic number found at 0x200? My hexdump output does not have that magic number (1f 8b) in any instance. Leads me to believe my backup is not a tar file. Any suggestions then?
@notamamasboy, you are unfortunately correct.
Someone else also mentioned that their
Code:
userdata_xxxxxxxx_yyyyyy.backup
file was not of the same format I tried some "known magic headers", and could not find anything tell-tale. In which case, without some clues, you are back at square one.
ektoric said:
@notamamasboy, you are unfortunately correct.
Someone else also mentioned that their
Code:
userdata_xxxxxxxx_yyyyyy.backup
file was not of the same format I tried some "known magic headers", and could not find anything tell-tale. In which case, without some clues, you are back at square one.
Click to expand...
Click to collapse
Even more peculiarly, two backups were created a .backup and a .backup2, I wonder if combining with cat I can get somewhere...

Is it possible to modify system files after flashing a firmware?

Hi, I have a rooted Lenovo B device (Mediatek M6735M) with TWRP recovery. I tried to change some build.prop values using an editor app but the result was I bricked my phone (and had to flash stock firmware again). Now, I wonder if and how I can apply some changes to the system files after flashing the firmware.
I want to ask you: is it possible to modify sys/system files after the firmware has been flashed (even the read-only ones), or is pre-flash manipulation the only solution? For example: is it safe to pull a system file with adb, modify it, then push it to the phone with adb?
Black Heretic said:
Hi, I have a rooted Lenovo B device (Mediatek M6735M) with TWRP recovery. I tried to change some build.prop values using an editor app but the result was I bricked my phone (and had to flash stock firmware again). Now, I wonder if and how I can apply some changes to the system files after flashing the firmware.
I want to ask you: is it possible to modify sys/system files after the firmware has been flashed (even the read-only ones), or is pre-flash manipulation the only solution? For example: is it safe to pull a system file with adb, modify it, then push it to the phone with adb?
Click to expand...
Click to collapse
No. You want to root your android again to do these.
Ashwinrg said:
No. You want to root your android again to do these.
Click to expand...
Click to collapse
I forgot to say that I rooted the phone again. I'd like to know if it is possible to edit system files after flashing a firmware (and rooting the phone) or if I'm forced to apply all system changes before flashing. Also, I'd like to know what kind of changes are allowed and/or forbidden (in order to avoid another brick).
For example, I found a read-only "serialno" file in "sys" folder and this file contains the serial number of the device. Could I pull this file with adb, change the content of this file (with another serial number) then push it into the phone?
Black Heretic said:
I forgot to say that I rooted the phone again. I'd like to know if it is possible to edit system files after flashing a firmware (and rooting the phone) or if I'm forced to apply all system changes before flashing. Also, I'd like to know what kind of changes are allowed and/or forbidden (in order to avoid another brick).
For example, I found a read-only "serialno" file in "sys" folder and this file contains the serial number of the device. Could I pull this file with adb, change this file (with another serial number) then push it into the phone?
Click to expand...
Click to collapse
You can change anything after rooting your phone. Make sure you are doing it correctly. Keep nandroid backup to recover from bad scenarios.
Ashwinrg said:
You can change anything after rooting your phone. Make sure you are doing it correctly. Keep nandroid backup to recover from bad scenarios.
Click to expand...
Click to collapse
Ok, but I'd like to have some general tips or advices before doing that. For example, I read (somewhere, here on xda) that file permissions have to be the same as the original file, so if I edit a read-only file I have to restore its read-only status or I could brick the phone. Is this true?
Black Heretic said:
Ok, but I'd like to have some general tips or advices before doing that. For example, I read (somewhere, here on xda) that file permissions have to be the same as the original file, so if I edit a read-only file I have to restore its read-only status or I could brick the phone. Is this true?
Click to expand...
Click to collapse
Yes. If you change permission to read-write then after modification you want change permission to read-only.
Grab ithat build.prop file and transfer to memory card using TWRP. Edit at PC and restore it

Boot Logo

I finally changed the boot logo in my phone. By keeping permissions the same and not extracting the the whole param file... and root because i am lazy.
Take the .zip from the end of the file name and paste the poison simply as PARAM and reboot and enjoy your new green logo. Of course back up original.
Permissions should not be an issue and i attached a screen of the file info i took prior to editing it.
I forgot to say what i used to change the logo.jpg
Linux and xarchiver utility. Extracted and replaced with my image and set permissions. Checked to make sure file size was similar and proper resolution and that's it. Hope to figure a way to flash it soon so i can wreck stuff faster.
Ah... probably should mention to do this NOT on stock ROM or at all. The more i read on it the more stupid it is to mess with this area unless you know what you're doing. I'll leave it up but don't think anyone should try it.
Ok! I hope this is useful because i've been able to change the initial image with perhaps a MUCH safer way.
Using Linux, i installed Heimdall.
I extracted stock ROM within Linux and used Ark to extract what the Mint archive wouldn't.
Already i had prepared my 2220x1080 jpg to 75 kb and simply deleted logo.jpg within param.bin while viewing with Xarchiver. I did not extract the param.bin file. Then i added my logo.jpg and closed up Xarchiver. The new logo.jpg was also set to r--r--r-- before insertion.
Then, with phone plugged in while in download mode (usb enabled prior in dev options and tested of course)... opened up the terminal from the folder containing param.bin and typed:
sudo su
Heimdall flash --PARAM (dragged param.bin into terminal window and hit enter)
Device booted with new image and then into twrp. I figured a cache wipe was needed so i did that and all was good. Would like to know if this is a horrible idea. Just using rooted stock ROM with twrp.
I posted the image... but of course my phone didn't change anything at the bottom. No way.
Does the image need to be the same file size i have tried making my own logo but it does not really work

Can't seem to write to /system/vendor/etc

I guess I'm a moron and can't figure this out :v
Using stock rooted Oreo, Magisk, edXposed, everything that goes with them. TWRP 3.2.3-7.
Lately, I've been using my headphones while driving to work. I need a touch more volume over stock to deal with wind noise.
The problem is, I absolutely can't get /system/vendor/etc into a writable state.
Attempts to modify mixer_paths_tavil.xml whilst booted up fail, either resulting in an unreadable file (Total Commander) or just not working (Root Explorer).
Trying to flash a modified zip (just grabbed a dual-speaker mod and replaced the xml) in TWRP results in no file being created; it doesn't seem to throw an error, just silently fails.
Manually copying the xml to /system/vendor/etc using TWRP's file manager ~appears~ to work, but attempts to set permissions results in error code 1. The file doesn't exist upon reboot.
Remounting manually as RW in TWRP's terminal doesn't seem to help. And yes, "mount System as read-only" is unchecked.
I can make build.prop changes, so I know /system is writable. The only way I can get anything written to /system/vendor/etc is restoring a full system backup.
I've modified this file before; I manually tweaked the call volume higher and enabled "fake" high-impedance mode.
So I'm sure I'm doing something really stupid here. Help.
Septfox said:
I guess I'm a moron and can't figure this out :v
Using stock rooted Oreo, Magisk, edXposed, everything that goes with them. TWRP 3.2.3-7.
Lately, I've been using my headphones while driving to work. I need a touch more volume over stock to deal with wind noise.
The problem is, I absolutely can't get /system/vendor/etc into a writable state.
Attempts to modify mixer_paths_tavil.xml whilst booted up fail, either resulting in an unreadable file (Total Commander) or just not working (Root Explorer).
Trying to flash a modified zip (just grabbed a dual-speaker mod and replaced the xml) in TWRP results in no file being created; it doesn't seem to throw an error, just silently fails.
Manually copying the xml to /system/vendor/etc using TWRP's file manager ~appears~ to work, but attempts to set permissions results in error code 1. The file doesn't exist upon reboot.
Remounting manually as RW in TWRP's terminal doesn't seem to help. And yes, "mount System as read-only" is unchecked.
I can make build.prop changes, so I know /system is writable. The only way I can get anything written to /system/vendor/etc is restoring a full system backup.
I've modified this file before; I manually tweaked the call volume higher and enabled "fake" high-impedance mode.
So I'm sure I'm doing something really stupid here. Help.
Click to expand...
Click to collapse
Don't know, but tonight or tomorrow I'll shoot you a file to test.
ChazzMatt said:
Don't know, but tonight or tomorrow I'll shoot you a file to test.
Click to expand...
Click to collapse
Appreciated, but I think something's going pear-shaped and I just need to reflash the ROM; setting up for the drive home last night, it seems I've lost the ability to use direct output in Poweramp. I don't know how, since the system+system image backup I restored is known-good and audio is otherwise working.
Good ol' bitrot, I suppose.
Septfox said:
Appreciated, but I think something's going pear-shaped and I just need to reflash the ROM; setting up for the drive home last night, it seems I've lost the ability to use direct output in Poweramp. I don't know how, since the system+system image backup I restored is known-good and audio is otherwise working.
Good ol' bitrot, I suppose.
Click to expand...
Click to collapse
See my PM.

Categories

Resources