I am creating a list of the reservedodm fuse settings. its a set of numbers that refer to the programmable fuses embedded in moto phones (that i know of) that controls your ability to downgrade to different versions of android and can even list if your phone is currently unlocked.
at the moment this is purely for reference for possible future projects
if your willing to contribute to the thread please list the following in your post
*last sbf used including the version of android
*the newest sbf that has been applied to your phone at any time
*the highest version of android & moto version that has ever been on your phone
*version of android with moto version
*any update.zips used at any time
*specify whether phone is DX2 or MX2
*the print out from the reservedodm file
*system version
*kernel version
*anything else you wish to contribute
how to get reservedodm
Code:
[email protected]:/home/lrs# adb shell
$ su
# cat /sys/firmware/fuse/ReservedOdm
40000000000040006000100000000
you can also send me the contents of the fuse file (compress and upload or email to me)
please include the above information including sbfs, update.zips, system versions, kernel versions
example code to copy the fuses folder
Code:
# cp /sys/firmware/fuse /sdcard-ext/keep/
cp: /sys/firmware/fuse is a directory (not copied).
# cp -r /sys/firmware/fuse /sdcard-ext/keep/
# exit
$ exit
[email protected]:/home/lrs# mkdir fuses
[email protected]:/home/lrs# adb pull /sdcard-ext/keep/fuse /home/lrs/fuses
pull: building file list...
pull: /sdcard-ext/keep/fuse/ReservedOdm -> /home/lrs/fuses/ReservedOdm
pull: /sdcard-ext/keep/fuse/SecBootDeviceSelectRaw -> /home/lrs/fuses/SecBootDeviceSelectRaw
pull: /sdcard-ext/keep/fuse/SkipDevSelStraps -> /home/lrs/fuses/SkipDevSelStraps
pull: /sdcard-ext/keep/fuse/SwReserved -> /home/lrs/fuses/SwReserved
pull: /sdcard-ext/keep/fuse/SpareBits -> /home/lrs/fuses/SpareBits
pull: /sdcard-ext/keep/fuse/sku -> /home/lrs/fuses/sku
pull: /sdcard-ext/keep/fuse/SecureBootKey -> /home/lrs/fuses/SecureBootKey
pull: /sdcard-ext/keep/fuse/SecBootDeviceSelect -> /home/lrs/fuses/SecBootDeviceSelect
pull: /sdcard-ext/keep/fuse/SecBootDeviceConfig -> /home/lrs/fuses/SecBootDeviceConfig
pull: /sdcard-ext/keep/fuse/KeyProgrammed -> /home/lrs/fuses/KeyProgrammed
pull: /sdcard-ext/keep/fuse/JtagDisable -> /home/lrs/fuses/JtagDisable
pull: /sdcard-ext/keep/fuse/DeviceKey -> /home/lrs/fuses/DeviceKey
pull: /sdcard-ext/keep/fuse/kfuse_raw -> /home/lrs/fuses/kfuse_raw
pull: /sdcard-ext/keep/fuse/OdmProduction -> /home/lrs/fuses/OdmProduction
14 files pulled. 0 files skipped.
0 KB/s (633 bytes in 0.972s)
sbf used 2.3.6 ntelos (newest)
update.zip 45.0.23 ntelos (latest)
MX2
system: 45.0.43.MB867.ACG-nTelos.en.US
kernel: 2.6.32.9-00011-gbc368b9 [email protected] #2
reservedodm: 40000000000040006000100000000
Related
Hi, I have made cron work on my 7" china tablet, it runs almost like I'd like it to..
I've made a passwd file in /etc with the following contents:
Code:
root:x:0:0::/data/cron:/system/bin/bash
I've made a symlink from /system/bin to /bin
And I've made a crontab file with the following line in it:
Code:
* * * * * /system/xbin/cat /sys/class/power_supply/battery/capacity > /dev/ttyACM0
Now the problem.. Cron runs fine, running the small bash code every minute, but..
ttyACM0 is a serial line to a microController - but the problem is that nothing is received on the controller, despite the cron running the script.
now if I LS /dev/tty* I get the following:
Code:
[email protected]:/ # ls /dev/ttyA* -l
ls /dev/ttyA* -l
crw------- root root 166, 0 2013-09-07 13:11 ttyACM0
-rw-rw-rw- root root 3 2013-09-07 13:14 ttyACM0
[email protected]:/ #
The cron creates an identical file in /dev and write it's data to this file, and not the *real* ttyACM0 serial..
I start the crond service in init.rc like this:
Code:
service crond /system/xbin/crond -c /data/cron
user root
disabled
oneshot
on property:dev.bootcomplete=1
.
.
start crond
If I change the cronscript to output to a flat file somewhere else (like /data/test_output), I can see the file with LS, but I'm not able to delete it nor cat it.
What's going on?
I need this to work in order to trigger a charger once the battery goes too low, and turn it off again once it has reached a given threshold. Not being able to send a simple command via serial really offsides this project.
Please help
Could it be that the cron job starts before the /dev/ttyACM0 is created?
hmm, I'll try and delay it a bit..
Made a simple check for if the device exists or not. if [ -c /dev/ttyACM0 ]This solves the problem.
Hi,
I tried porting LinageOS 14 to the Samsung Galaxy A3(2016) SM-A310F and this is a summary of my endeavors. The end result will be a flashabel .zip-file, also called OTA-package. I should say, that the resulting image does not yet boot!
There is little information on how to exactly port LineageOS to a new device, so I had to read a bit:
https : // source . android . com / source/ initializing . html
http : // web . archive . org /web / 2 0161224192644 / https :// wiki . cyanogenmod . org / w / Doc:_porting_intro
http : // web . archive . org / web / 20161224194055 / https : // wiki . cyanogenmod . org / w /Local_manifest
http : // wiki . lineageos . org / devices/ hero2lte /build
http : // www . trcompu . com / MySmartPhone / AndroidKitchen / Breakfast -Brunch -Lunch . html
http : // wiki . lineageos . org /signing_builds . html # generating-and-signing -target-files.
We start with installing TWRP onto our phone and rooting it afterwards. Now we look around and inspect the partition layout. The following command are run on the device with the help of adb (sudo apt-get install adb):
Code:
adb shell
su
[email protected]:/ # ls -al /dev/block/platform/13540000.dwmmc0/by-name/
lrwxrwxrwx root root 2017-03-06 17:48 BOOT -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2017-03-06 17:48 BOTA0 -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2017-03-06 17:48 BOTA1 -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2017-03-06 17:48 CACHE -> /dev/block/mmcblk0p21
lrwxrwxrwx root root 2017-03-06 17:48 CARRIER -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2017-03-06 17:48 CDMA-RADIO -> /dev/block/mmcblk0p13
lrwxrwxrwx root root 2017-03-06 17:48 CPEFS -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2017-03-06 17:48 DNT -> /dev/block/mmcblk0p16
lrwxrwxrwx root root 2017-03-06 17:48 EFS -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2017-03-06 17:48 HIDDEN -> /dev/block/mmcblk0p22
lrwxrwxrwx root root 2017-03-06 17:48 OTA -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 2017-03-06 17:48 PARAM -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2017-03-06 17:48 PERSDATA -> /dev/block/mmcblk0p18
lrwxrwxrwx root root 2017-03-06 17:48 PERSISTENT -> /dev/block/mmcblk0p17
lrwxrwxrwx root root 2017-03-06 17:48 RADIO -> /dev/block/mmcblk0p14
lrwxrwxrwx root root 2017-03-06 17:48 RECOVERY -> /dev/block/mmcblk0p11
lrwxrwxrwx root root 2017-03-06 17:48 RESERVED2 -> /dev/block/mmcblk0p19
lrwxrwxrwx root root 2017-03-06 17:48 SYSTEM -> /dev/block/mmcblk0p20
lrwxrwxrwx root root 2017-03-06 17:48 TOMBSTONES -> /dev/block/mmcblk0p15
lrwxrwxrwx root root 2017-03-06 17:48 USERDATA -> /dev/block/mmcblk0p23
lrwxrwxrwx root root 2017-03-06 17:48 m9kefs1 -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2017-03-06 17:48 m9kefs2 -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2017-03-06 17:48 m9kefs3 -> /dev/block/mmcblk0p7
Also, take note of the CPU
Code:
[email protected]:/ # cat /proc/c
cgroups cmdline consoles cpuinfo crypto
[email protected]:/ # cat /proc/cpuinfo
Processor : AArch64 Processor rev 3 (aarch64)
processor : 0
Features : fp asimd aes pmull sha1 sha2 crc32 wp half thumb fastmult vfp edsp neon vfpv3 tlsi vfpv4 idiva idivt
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 3
Hardware : SAMSUNG Exynos7580
We also need to find the block-size:
Code:
[email protected]:/ # df -k
This will tell us 4.0 K block size.
Note: if you install parted on the device it will tell you:
Model: MMC AJNB3R (sd/mmc)
Disk /dev/block/mmcblk0: 15758000128B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
I started with a fresh install of Ubuntu 14.04 LTS 64-Bit, as described by Google. If you use some newer Ubuntu, there may be some problems with packages. I did not suceed with e.g. 16.10.
Install some basic packages:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \
lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \
libgl1-mesa-dev libxml2-utils xsltproc unzip
Install LinageOS packages:
Code:
sudo apt-get install bc bison build-essential curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop openssl-dev pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev
Install OpenJDK-8 (remove openjdk-7 first!)
Code:
sudo apt-get autoremove openjdk-7-jre
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk
Download the repo command
replace XXXX with https : // storage.googleapis.
Code:
curl XXXXcom/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Prepare you bash environment:
Edit the file ~/.profile (it is a hidden file in your home directory). You can make it visible in the Ubuntu file manager (called Nautilus) by pressing CTR+H.
Add this to the end of the file.
Code:
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
export USE_CCACHE=1
export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx8G"
The last line will increase the memory for the build process with 'jack'. If the size -Xmx8G is too small (here 8 gigabytes), the build process will fail.
Restart you terminal window for the changes to take effect, or run
Code:
source ~/.profile
Download LineageOS
Preparation
replace XXX with https : // github.com
Code:
mkdir -p ~/bin
mkdir -p ~/android/lineage
cd ~/android/lineage
repo init -u XXX/LineageOS/android.git -b cm-14.1
Start the download with:
Code:
repo sync
If it fails, just start it again. This will be several Gbs and take a few hours.
If everything goes well, we can download some more files specific to our device a3xelte. We are lucky and there is already some GitHub-Repository Exynos 7580 with device-specific code, I think maintained by aapav01.
Create or open the file android/lineage/.repo/local_manifests/roomservice.xml.
Replace it with the following content and save the file:
Code:
<manifest>
<project name="Exynos7580/android_device_samsung_a3xeltexx" path="device/samsung/a3xeltexx" remote="github" revision="cm-14.1"/>
<project name="Exynos7580/android_device_samsung_exynos7580-common" path="device/samsung/exynos7580-common" remote="github" revision="cm-14.1"/>
<project name="Exynos7580/android_vendor_samsung_a3xeltexx" path="vendor/samsung/a3xeltexx" remote="github" revision="cm-14.1"/>
<project name="LineageOS/android_hardware_samsung_slsi-cm_exynos5" path="hardware/samsung_slsi-cm/exynos5" remote="github" revision="cm-14.1"/><project name="Exynos7580/android_hardware_samsung_slsi-cm_exynos7580" path="hardware/samsung_slsi-cm/exynos7580" remote="github" revision="cm-14.1"/>
<project name="LineageOS/android_external_stlport" path="external/stlport" remote="github"/>
<project name="LineageOS/android_hardware_samsung" path="hardware/samsung" remote="github"/>
<project name="LineageOS/android_hardware_samsung_slsi-cm_exynos" path="hardware/samsung_slsi-cm/exynos" remote="github"/><project name="LineageOS/android_hardware_samsung_slsi-cm_openmax" path="hardware/samsung_slsi-cm/openmax" remote="github"/>
</manifest>
Run the repo synch command again in the root of the LinageOS folder:
Code:
cd ~/android/lineage
repo sync
I should mention, that there is a repository https : // github . com / Exynos7580/android_kernel_samsung_a3xelte, but I did not use that. You could try to use this, if it will give you better results.
I instead, choose to try to use the raw Samsung kernel source. To do that, got to http :/ opensource. samsung . com/reception .do and type 'SM-A310F' in the search box. I choose to download the Android 6.0.1 files SM-A310F_MEA_MM_Opensource.zip
Extract it to some place, extract again resulting the Kernel.tar.gz.
Create the directory ~/android/lineage/kernel/samsung/ and copy the just extracted 'kernel'-directory to it. Rename the directory to a3xeltexx, so that you now have the kernel in ~/android/lineage/kernel/samsung/a3xeltexx.
Edit the device properties
go to device/samsung/a3xeltexx
and edit the files BoardConfig.mk and lineage.mk to your liking and do the same with /device/samsung/exynos7580-common/BoardConfigCommon.mk.
I don't know what the right values are, but for example, I set the number of SIM-cards to match my phone:
Code:
SIM_COUNT := 1
Also adjust the name of the kernel configuration file.
I should mention that for the SM-A310F the following values are defined in the original build.prop, and therefore this device should be called 'a3xelte' instead of 'a3xeltexx' according to the LineageOS nomenclature rules. But I did not yet change all the directroy names. That is left to when the image will boot up.
Code:
ro.product.model=SM-A310F
ro.product.brand=samsung
ro.product.name=a3xeltexx
ro.product.device=a3xelte
ro.product.board=universal7580
Extract proprietary blobs
I choose to extract the binary blobs from running phone, not a firmware image. To do so, you need have a rooted phone with adb debug enabled and granted adb root permission.
I needed to edit the file ~/android/lineage/device/samsung/a3xeltexx/extract-files.sh to look like this
Code:
...
if [ "$SRC" = "adb" ]; then
echo $DEST
set +e
# Try CM target first
adb pull /system/$DEST $2/$DEST
# if file does not exist try OEM target
if [ "$?" != "0" ]; then
echo "Try using OEM target"
adb pull /system/$FILE $2/$DEST
fi
set -e
if [ ! -f $2/$DEST ]; then
echo "File not yet copied -> try as root!"
adb shell mkdir -p /sdcard/tmp
adb shell mkdir -p /sdcard/tmp/$DIR
echo "Copy to temp location"
adb shell su -c "cp /system/$FILE /sdcard/tmp/$FILE"
adb pull /sdcard/tmp/$FILE $2/$DEST
adb shell rm /sdcard/tmp/$FILE
adb shell rm /sdcard/tmp/$DIR
fi
...
then run
Code:
cd ~/android/lineage/device/samsung/a3xeltexx
./extract-files.sh
Fix build-problems
The kernel will not build successfully right now, but we can help it compile, if we create a bunch of empty directories. Must be done after each cleaning of the build tree.
Create a new file ~/android/linage/cerres-prepare-kernel.sh and paste the following lines
Code:
mkdir -p out/target/product/a3xeltexx/obj/KERNEL_OBJ/security/tima_uevent
mkdir -p out/target/product/a3xeltexx/obj/KERNEL_OBJ/drivers/gud/gud-exynos7580/MobiCoreDriver/platforms
mkdir -p out/target/product/a3xeltexx/obj/KERNEL_OBJ/drivers/gud/gud-exynos7580/MobiCoreDriver/platforms/EXYNOS_7580_STD
mkdir -p out/target/product/a3xeltexx/obj/KERNEL_OBJ/firmware/tsp_synaptics
mkdir -p out/target/product/a3xeltexx/obj/KERNEL_OBJ/firmware/tsp_atmel
mkdir -p out/target/product/a3xeltexx/obj/KERNEL_OBJ/firmware/tsp_stm
mkdir -p out/target/product/a3xeltexx/obj/KERNEL_OBJ/drivers/media/platform/exynos/fimc-is2/hardware/api
mkdir -p out/target/product/a3xeltexx/obj/KERNEL_OBJ/drivers/muic/universal
make it executable and run it:
Code:
cd ~/android/lineage
chmod a+x cerres-prepare-kernel.sh
./cerres-prepare-kernel.sh
Fix include errors
For some reason, unknown to me, some required header files are not copied to out/target/product/a3xeltexx/obj/KERNEL_OBJ/usr/include.
Go to kernel/samsung/a3xeltexx/include/uapi/linux and find the files
Code:
videodev2_exynos_camera.h
videodev2_exynos_camera_ext.h
videodev2_exynos_media.h
and copy them to these newly created directories:
Code:
~/android/lineage/hardware/samsung_slsi-cm/exynos/include/linux
~/android/lineage/hardware/samsung_slsi-cm/exynos5/include/linux
To start building type:
Code:
cd ~/android/lineage
. build/envsetup.sh
lunch lineage_a3xeltexx-userdebug
mka target-files-package dist
The build will run now for several hours. For my machine, with only 4GB of ram this will take around 24 hours. Also, the mka command uses too many threads for me (the build script would loose connection to the jack server), so I had to reduce the number of threads by editing the file /home/cerres/android/system/vendor/cm/build/envsetup.sh (look for the make command!)
Generating the flashable zip-package
Create key-pairs for your own use:
Code:
subject='/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/[email protected]'
mkdir ~/.android-certs
for x in releasekey platform shared media; do \
./development/tools/make_key ~/.android-certs/$x "$subject"; \
done
Sign the target files:
Code:
cd ~/android/lineage
croot
./build/tools/releasetools/sign_target_files_apks -o -d ~/.android-certs \
out/dist/*-target_files-*.zip \
out/dist/signed-target_files.zip
The signing doesn't currently work, because this error is generated:
Code:
ERROR: couldn't find ro.build.date.utc in build.prop
I'll have to figure out, how to fix that. However, we can create an OTA package from the unsigend target files. Just modify the file name accordingly.
And, finally, build the OTA-package:
Code:
./build/tools/releasetools/ota_from_target_files -k ~/.android-certs/releasekey \
--block --verbose --no_prereq \
out/dist/signed-target_files.zip \
out/signed-ota_update.zip
Copy the file out/signed-ota_update.zip to an extenal sd-card and flash it using TWRP -> boot loop.
Points for future improvements
To debug boot problems in the kernel ('boot-loop') it would be wise to enable logging in the kernel config:
Code:
CONFIG_PSTORE=y
CONFIG_PSTORE_CONSOLE=y
CONFIG_PSTORE_RAM=y
Try building with integrated root support
create a .sh file with the following content and run it before building:
Code:
export WITH_SU=true
Final remarks:
some problems could be due to the fact, that I'm trying to use the Samsung kernel for 6.0.1 with Android 7.0 (LineageOS 14).
I hope this post helps you getting started to play around with your own code-base.
We have a Lineage OS that boots up in the Development section. Maybe you could use that kernel? Cuz the only two major bugs i faced was the microphone not working properly and a deep sleep issue wherein the phone would not wake up if it wasnt used for a long while.
Why not try Lineage OS 13.x instead. I'm going to give this a shot on my build env
Can you send us the output ??
Thanks
Ok, I'll share my ROM, because it was requested.
Warning: This will not boot! It will cause a boot loop (aka. soft-brick)!
However, You can recover the device by flashing a good kernel-image like lineage-14.1-a3xeltex-patch-2.zip from the thread by @EmpireIsHere .
Ok, you have been warned, here is the link: https : //www . androidfilehost . com/?fid=673368273298945673
I think there is problem in the very early stages of the kernel bootloader process, but I don't know what goeswrong.
If anybody can give a hint, that would be very appreciated!
Cerres1 said:
Ok, I'll share my ROM, because it was requested.
Warning: This will not boot! It will cause a boot loop (aka. soft-brick)!
However, You can recover the device by flashing a good kernel-image like lineage-14.1-a3xeltex-patch-2.zip from the thread by @EmpireIsHere .
Ok, you have been warned, here is the link: https : //www . androidfilehost . com/?fid=673368273298945673
I think there is problem in the very early stages of the kernel bootloader process, but I don't know what goeswrong.
If anybody can give a hint, that would be very appreciated!
Click to expand...
Click to collapse
Now, if it boots, are there any things which are not working ?
if i understand you correctly, we can fix the "its not booting" by flashing the patch from alexax66
Edit:
tried it, its garbage
Cerres1 said:
Ok, I'll share my ROM, because it was requested.
Warning: This will not boot! It will cause a boot loop (aka. soft-brick)!
However, You can recover the device by flashing a good kernel-image like lineage-14.1-a3xeltex-patch-2.zip from the thread by @EmpireIsHere .
Ok, you have been warned, here is the link: https : //www . androidfilehost . com/?fid=673368273298945673
I think there is problem in the very early stages of the kernel bootloader process, but I don't know what goeswrong.
If anybody can give a hint, that would be very appreciated!
Click to expand...
Click to collapse
Ok, thanks
This kernel problem is very strange
Deleted
I have an Lenovo Vibe C (a2020a40) and I want to use framebuffer. For example when I try
Code:
cat /dev/urandom > /dev/graphics/fb0
it returns with
Code:
tmp-mksh: cat: <stdout>: No such device
.
Code:
ls -al /dev/graphics/
crwsr-sr-x system graphics 29, 0 1970-01-23 12:32 fb0
Is there something I need to do to get fb0 working? BTW I rooted my phone by flashing SuperSU via TWRP.
Here's how it can be done.
Reboot into TWRP, mount /system in RW mode, fetch(1) /system/usr/keylayout/synaptics_dsx.kl and edit it.
Originally it looks like
Code:
key 158 BACK VIRTUAL
key 172 HOME VIRTUAL
key 580 APP_SWITCH VIRTUAL
You need to change it to
Code:
key 158 APP_SWITCH VIRTUAL
key 172 HOME VIRTUAL
key 580 BACK VIRTUAL
and then upload(2) back to your phone.
Code:
1. adb pull /system/usr/keylayout/synaptics_dsx.kl
2. adb push synaptics_dsx.kl /system/usr/keylayout/
Hopefully this feature will be implemented at the user level.
birdie said:
Here's how it can be done.
Reboot into TWRP, mount /system in RW mode, fetch(1) /system/usr/keylayout/synaptics_dsx.kl and edit it.
Originally it looks like
Code:
key 158 BACK VIRTUAL
key 172 HOME VIRTUAL
key 580 APP_SWITCH VIRTUAL
You need to change it to
Code:
key 158 APP_SWITCH VIRTUAL
key 172 HOME VIRTUAL
key 580 BACK VIRTUAL
and then upload(2) back to your phone.
Code:
1. adb pull /system/usr/keylayout/synaptics_dsx.kl
2. adb push synaptics_dsx.kl /system/usr/keylayout/
Hopefully this feature will be implemented at the user level.
Click to expand...
Click to collapse
Hello. Is it possible to edit this file on Android giving some editor root privileges?
Yes but you'll have to reboot your phone after that.
Registered just to thank you for this! I was trying to get used to the buttons being flipped in comparison to my previous phones, but just couldn't
In case anyone comes here and is as newbie as I am:
If you're unrooted/don't want to root and are worried by the previous post, I did it with an unrooted phone just fine. Just needed twrp and adb. That post is asking about editing directly on the phone, while OP's outlined method has you using your desktop and... I used notepad++ but I assume regular notepad will work too, just right click and "open with..." to edit the .kl file. By RW mode, OP means having system mounted in read/write mode, which twrp will do by default at least in the version I'm using which is 3.1.1-0-x2. Just don't check off the option to make it read only. By the way, it wouldn't over-write for me, so I deleted synaptics_dsx.kl in twrp then pushed the edited file.
Can someone help me do this!
In simpler terms can someone explain this to me?
Clarification of explanation
Dear birdie,
Could you perhaps elaborate on the "mount /system in RW mode, fetch(1) /system/usr/keylayout/synaptics_dsx.kl " instruction?
I am trying to disable the "recent apps" button on the Moto G3 in LineageOS 14.1, and I think if I map Home twice, (once more on `key 580` {or what the number on my type of device will be}), i have obtained that goal.
Any suggestions are appreciated, kind regards.
birdie said:
Here's how it can be done.
Reboot into TWRP, mount /system in RW mode, fetch(1) /system/usr/keylayout/synaptics_dsx.kl and edit it.
Originally it looks like
Code:
key 158 BACK VIRTUAL
key 172 HOME VIRTUAL
key 580 APP_SWITCH VIRTUAL
You need to change it to
Code:
key 158 APP_SWITCH VIRTUAL
key 172 HOME VIRTUAL
key 580 BACK VIRTUAL
and then upload(2) back to your phone.
Code:
1. adb pull /system/usr/keylayout/synaptics_dsx.kl
2. adb push synaptics_dsx.kl /system/usr/keylayout/
Hopefully this feature will be implemented at the user level.
Click to expand...
Click to collapse
Explicit intended steps.
After doing some research I think
mount system in RW (rewritable) mode and fetch(1) $/system/usr/keylayout/synaptics_dsx.kl$ and edit it.
Click to expand...
Click to collapse
can be performed with the following steps:
0. Commanders intend: mount system in RW (rewritable) mode:
1. Download minimal ADB and Fastboot.
2. Install TWRP and root on your phone
3. Steps: open adb on pc. Current location = \url{E:\somefolder\Minimal ADB and Fastboot_techbeasts\py.cmd
4. connect the phone with usb to pc.
5. Select mount in TWRP:
6. select \textbackslash system
7. press mount.
8. source for next step: \url{https://forum.xda-developers.com/xperia-z2/help/help-to-mount-rw-twrp-recovery-t3376485}
9. \url{https://askubuntu.com/questions/175739/how-do-i-remount-a-filesystem-as-read-write}
10. \url{https://stackoverflow.com/questions/28009716/how-can-i-remount-my-android-system-as-read-write-in-a-bash-script-using-adb}
11. finally the last link, the following command sequence appears to solve the issue:
Code:
# Script to mount Android Device as read/write.
# List the Devices.
adb devices;
# Run adb as root (Needs root access).
adb root;
# Since you're running as root su is not required
adb shell mount -o rw,remount /;
12. Commanders intend: fetch(1) $/system/usr/keylayout/synaptics_dsx.kl$ and edit it.
13. Source used to execute commanders intend: \url{https://forum.xda-developers.com/shield-tv/general/change-3rd-party-remote-key-layout-root-t3548871}
14. steps: adb shell \textgreater enter \textless
15. That shows
Code:
~ # <-[6
\end{verbatim}
\item ignore that weird stuff and just immediately after enter:
\begin{verbatim}
cat /proc/bus/input/devices
16. Now you will have a list of connected remote/controller, take a note of the Vendor number and the Product number.
17. ctrl+c to get out of the to me uknown, ~\# thingy
18. adb pull $/system/usr/keylayout$
19. that yielded for my moto G3:
Code:
E:\somefolder\Minimal ADB and Fastboot_techbeasts>adb pull /system/usr/keylayout
pull: building file list...
pull: /system/usr/keylayout/qwerty.kl -> ./qwerty.kl
pull: /system/usr/keylayout/Vendor_2378_Product_100a.kl -> ./Vendor_2378_Product_100a.kl
pull: /system/usr/keylayout/Vendor_2378_Product_1008.kl -> ./Vendor_2378_Product_1008.kl
pull: /system/usr/keylayout/Vendor_22b8_Product_093d.kl -> ./Vendor_22b8_Product_093d.kl
pull: /system/usr/keylayout/Vendor_1d79_Product_0009.kl -> ./Vendor_1d79_Product_0009.kl
pull: /system/usr/keylayout/Vendor_1bad_Product_f036.kl -> ./Vendor_1bad_Product_f036.kl
pull: /system/usr/keylayout/Vendor_1bad_Product_f027.kl -> ./Vendor_1bad_Product_f027.kl
pull: /system/usr/keylayout/Vendor_1bad_Product_f023.kl -> ./Vendor_1bad_Product_f023.kl
pull: /system/usr/keylayout/Vendor_1bad_Product_f016.kl -> ./Vendor_1bad_Product_f016.kl
pull: /system/usr/keylayout/Vendor_1949_Product_0401.kl -> ./Vendor_1949_Product_0401.kl
pull: /system/usr/keylayout/Vendor_18d1_Product_5018.kl -> ./Vendor_18d1_Product_5018.kl
pull: /system/usr/keylayout/Vendor_18d1_Product_2c40.kl -> ./Vendor_18d1_Product_2c40.kl
pull: /system/usr/keylayout/Vendor_1689_Product_fe00.kl -> ./Vendor_1689_Product_fe00.kl
pull: /system/usr/keylayout/Vendor_1689_Product_fd01.kl -> ./Vendor_1689_Product_fd01.kl
pull: /system/usr/keylayout/Vendor_1689_Product_fd00.kl -> ./Vendor_1689_Product_fd00.kl
pull: /system/usr/keylayout/Vendor_1532_Product_0900.kl -> ./Vendor_1532_Product_0900.kl
pull: /system/usr/keylayout/Vendor_12bd_Product_d015.kl -> ./Vendor_12bd_Product_d015.kl
pull: /system/usr/keylayout/Vendor_1038_Product_1412.kl -> ./Vendor_1038_Product_1412.kl
pull: /system/usr/keylayout/Vendor_0b05_Product_4500.kl -> ./Vendor_0b05_Product_4500.kl
pull: /system/usr/keylayout/Vendor_05ac_Product_0239.kl -> ./Vendor_05ac_Product_0239.kl
pull: /system/usr/keylayout/Vendor_0583_Product_2060.kl -> ./Vendor_0583_Product_2060.kl
pull: /system/usr/keylayout/Vendor_054c_Product_0268.kl -> ./Vendor_054c_Product_0268.kl
pull: /system/usr/keylayout/Vendor_046d_Product_c532.kl -> ./Vendor_046d_Product_c532.kl
pull: /system/usr/keylayout/Vendor_046d_Product_c299.kl -> ./Vendor_046d_Product_c299.kl
pull: /system/usr/keylayout/Vendor_046d_Product_c294.kl -> ./Vendor_046d_Product_c294.kl
pull: /system/usr/keylayout/Vendor_046d_Product_c21f.kl -> ./Vendor_046d_Product_c21f.kl
pull: /system/usr/keylayout/Vendor_046d_Product_c21d.kl -> ./Vendor_046d_Product_c21d.kl
pull: /system/usr/keylayout/Vendor_046d_Product_c219.kl -> ./Vendor_046d_Product_c219.kl
pull: /system/usr/keylayout/Vendor_046d_Product_c216.kl -> ./Vendor_046d_Product_c216.kl
pull: /system/usr/keylayout/Vendor_046d_Product_b501.kl -> ./Vendor_046d_Product_b501.kl
pull: /system/usr/keylayout/Vendor_045e_Product_0719.kl -> ./Vendor_045e_Product_0719.kl
pull: /system/usr/keylayout/Vendor_045e_Product_028e.kl -> ./Vendor_045e_Product_028e.kl
pull: /system/usr/keylayout/Vendor_0079_Product_0011.kl -> ./Vendor_0079_Product_0011.kl
pull: /system/usr/keylayout/Generic.kl -> ./Generic.kl
pull: /system/usr/keylayout/AVRCP.kl -> ./AVRCP.kl
35 files pulled. 0 files skipped.
37 KB/s (49818 bytes in 1.285s)
20. All those files are for pre-built in controllers that you can connect the the phone, eg xbox 360 controller, snes controller etc. Except for AVRCP.kl and Generic.kl, these are used for the normal phone.
21. Change Generic.kl as AVRCP.kl says AVRCP.kl is not used anymore.
22. Copy the Generic.kl back:
Code:
adb root
adb disable-verity
adb reboot
(power down, boot into twrp again)
adb root
adb remount
adb push "layout file" /system/usr/keylayout (becomes in this case:)
adb push Generic.kl /system/usr/keylayout
adb reboot
birdie said:
Here's how it can be done.
Reboot into TWRP, mount /system in RW mode, fetch(1) /system/usr/keylayout/synaptics_dsx.kl and edit it.
Originally it looks like
Code:
key 158 BACK VIRTUAL
key 172 HOME VIRTUAL
key 580 APP_SWITCH VIRTUAL
You need to change it to
Code:
key 158 APP_SWITCH VIRTUAL
key 172 HOME VIRTUAL
key 580 BACK VIRTUAL
and then upload(2) back to your phone.
Code:
1. adb pull /system/usr/keylayout/synaptics_dsx.kl
2. adb push synaptics_dsx.kl /system/usr/keylayout/
Hopefully this feature will be implemented at the user level.
Click to expand...
Click to collapse
Thanks. This is the hint I needed to make APP_SWITCH work on a device I'm playing with (SM-T113NU)
Hi, I'm completly lost. I'm trying to get Daydream running on a Sony Xperia XZ Premium (XZP). I read that 2 files must be modified for this. I already edited the build.prop file in /system. But the second one, the handheld_core_hardware.xml is for some reason not where it should be. I backed up the TA-partion and flashed the firmware "G8141_MobilTel EAD BG_1309-2357_47.2.A.10.62_R2C" with the kernel "boot-G8141-47.2.A.10.62-hideunlock-magisk-19.3.img" following the instructions here on XDA. Using ADB I open a root shell (ADB shell, su) and try to copy a modified version of the XML file from data/local/tmp to system/etc/permissions after re-mounting /system in rw-mode. I got the file by extracting the ext4-image in the system.sin of the firmware pack and pushed it to tmp using ADB. When I try to copy the file, I either get "I/O error" or no error. In the latter case the file is nevertheless not copied and I get the I/O error when mounting to ro-mode again. It's also strange that in this case I can cat the contents and list it via ls -l but only if I use the exact name no wildcards. On next boot or when ro-mounting succeeds its completely gone.
This is how it looks on the shell:
Code:
127|G8141:/system/etc/permissions # ls -l handheld_core_hardware.xml
ls: handheld_core_hardware.xml: No such file or directory
1|G8141:/system/etc/permissions # cp /data/local/tmp/handheld_core_hardware.xml /system/etc/permissions
cp: /system/etc/permissions/handheld_core_hardware.xml: I/O error
1|G8141:/system/etc/permissions # ls -l /data/local/tmp
total 12
-rw-rw-rw- 1 shell shell 4877 2019-09-06 10:03 handheld_core_hardware.xml
drwxr-xr-x 2 root root 4096 2019-09-06 11:47 test
G8141:/system/etc/permissions # mount | grep system
/dev/block/dm-0 on /system type ext4 (rw,seclabel,relatime,block_validity,discard,delalloc,barrier,user_xattr)
/dev/block/sde33 on /system/vendor/firmware_mnt type vfat (ro,context=u:object_r:firmware_file:s0,relatime,gid=1000,fmas
k=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro)
/dev/block/sde37 on /system/vendor/bt_firmware type vfat (ro,context=u:object_r:bt_firmware_file:s0,relatime,uid=1002,gi
d=3002,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro)
/dev/block/sde34 on /system/vendor/dsp type ext4 (ro,seclabel,nosuid,nodev,relatime,data=ordered)
/sbin/.magisk/block/system on /sbin/.magisk/mirror/system type ext4 (ro,seclabel,relatime,block_validity,discard,delallo
c,barrier,user_xattr)
G8141:/system/etc/permissions #
What am I doing wrong?
Is there maybe a better way meanwhile to enable Daydream on unsupported devices?
I mean, it's a bad joke, Sony makes this great 4k display but doesn't support VR properly. Daydream even starts and is working just to block the view a second later with a big PopUp telling that the device is not compatible.