Need help to get Tom Tom working on Intel device - MTCD Android Head Units Q&A

Hi Guys,
As we all know Tom Tom does not work on the intel units.
For the MTCB devices there is a way to get it working: https://forum.xda-developers.com/an...lution-tomtom-connection-to-internet-t3368026 To get that working you need xposed installed. Since we can not install xposed we can not use that methode.
If we look at this post: https://forum.xda-developers.com/showpost.php?p=69772506&postcount=109 someone already tried to put a serial into the default.prop file but that does not work.
I found this page: http://stackoverflow.com/questions/19368712/where-is-ro-boot-serialno-and-ro-serialno-stored that does not work neither.
http://forum.odroid.com/viewtopic.php?f=94&t=12243
This page says we need to extract the boot.file and use the CarlivImageKitchen tool to extract it so we can modified the file.
I could find the boot.img in the latest update from joying: https://www.carjoying.com/Joying-blog/59.html location: 5009_20.zip.
I tried to extract the boot.img and unpack it with the Kitchen tool and found the init.rc file. Also found the on boot section and added the following lines:
Code:
# Set serial number.
setprop ro.serialno 1234567812345678
setprop ro.boot.serialno 1234567812345678
setprop ril.serialnumber 1234567812345678
Also added those lines to the default.prop file.
Repacked the file and put everything together.
We know that if we put a usb stick with the latest firmware in the usb input from the device it will automatic update and so also the new serial numbers.
The point is, i only wrote a android program a few times and i do not know much about boot files etc.
My question to your developers (because you are 100x times better then i am) would this work? What could probably go wrong if we add 3 lines in the ini.rc file?
Hoping to get some help from you guys!

According to the steps you need to do to get root i found the command to copy the boot.img to the device:
Code:
adb shell dd if=/mnt/usb_storage/USB_DISK0/udisk0/boot.img of=/dev/block/mmcblk0p9
I used the boot.img from the root steps. Added the command in the init.rc file and default.prop. Copied it back to the device and booted.
No luck with the ro.serialno and ro.boot.serialno. serialno was changed to what i have set.
The values of ro.serialno are overwritten somewhere else

Hi,
Have you been able to change the serial no. yet? I'm also waiting for a solution to install Tomtom GO on to this intel headunit

Nope still no success.
I don't have any idea what i can do to fix it.

Put here photo whit error tomtom go please and model headunit and android .

Related

Modded recovery and boot images

Here is a zip file containing a modified recovery and boot image, as well as a few other things:
http://rapidshare.com/files/166164961/AndroidMod.zip
http://jf.nyquil.org/AndroidMod.zip
http://android-dls.com/forum/index.php?f=24&t=191&rb_v=viewtopic (see post for actual link to file)
NOTE: if you need a complete RC30 to v1.3 guide, see this page.
The recovery image (recovery_testkeys.img) uses the test keys that are distributed with the android platform source. This means that an OTA update or an update.zip update must be signed with the test key in order for it to install. In other words, it will no longer install OTA updates from t-mobile. You don't want them stealing back root access from you now do you? .
I've also included the test keys and the SignApk.jar tool, so you can sign your own update scripts (for use only with the modified recovery image). You can resign any image, even if it has been signed before. So for example, if you needed to install an "official" t-mobile update, you must re-sign it with the test keys first.
Another bonus in this recovery image is that ADB is enabled while in recovery mode. You can't adb into a shell (no sh binary), but you can at least use it to push and pull files from the device. For example, you could push an update.zip file to the sdcard.
The boot image (boot_nosecure.img) has been modified so that adb has root access by default. So when you do an adb shell, you automatically get a root shell. You can remount the system image using adb, and then push files directly to the system partition.
Finally, the "update - Restore Original RC29 Boot Image.zip" file is an update.zip file signed with the test keys, which will restore your boot partition back to the stock RC29 image. Useful if you accidentally hose your boot partition..
To install the recovery image onto your phone:
Code:
D:\Android\AndroidMod>adb push recovery_testkeys.img /data/local/recovery.img
912 KB/s (0 bytes in 1767424.001s)
D:\Android\AndroidMod>adb shell
$ su
su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# cd /system
cd /system
# cat /data/local/recovery.img > recovery.img
cat /data/local/recovery.img > recovery.img
# flash_image recovery recovery.img
flash_image recovery recovery.img
#
Note: You must place the recovery image at /system/recovery.img. the init.rc boot script automatically flashes the recovery partition with that file every time you boot up the phone.
At this point, it's probably a good idea to reboot the phone into recovery mode, and make sure it loads OK. If the recovery image is corrupt somehow, it will throw you back into SPL mode (the multi-color bootloader screen). If that happens, just boot the phone normally, and reflash recovery image.
Once it boots into recovery mode, press alt+L, and the next to top line of text should say something like "using test keys.". If it doesn't, then you're still using the original recovery image.
Note: If you are planning on installing the modified RC30 update, you can ignore the following - there is no need to install the boot image. The update already has a newer, modified boot image.
Now that you know you have the modified recovery image loaded, you can install the boot image:
Code:
D:\Android\AndroidMod>adb push boot_nosecure.img /data/local/boot.img
939 KB/s (0 bytes in 1533952.001s)
D:\Android\AndroidMod>adb shell
$ su
su
# flash_image boot /data/local/boot.img
flash_image boot /data/local/boot.img
# rm /data/local/boot.img
rm /data/local/boot.img
#
Now reboot the phone and let it boot normally. If the boot image was corrupted, it will boot into recovery mode instead. You can use the included update zip file to reload the original RC29 boot image.
Otherwise, if it boots up normally, open a command prompt however you like (telnet, adb, terminal emulator app, etc.) and type "getprop ro.secure". If it says 0, then you're running the modified boot image. Otherwise, if it says 1, you're still running the original boot image.
Attachement..
Hmm. It doesn't look like the attachment made it.. Does anyone have some space I could throw the file up at? It's around 5mb.
JesusFreke said:
Hmm. It doesn't look like the attachment made it.. Does anyone have some space I could throw the file up at? It's around 5mb.
Click to expand...
Click to collapse
I should have some space let me know
JesusFreke said:
Hmm. It doesn't look like the attachment made it.. Does anyone have some space I could throw the file up at? It's around 5mb.
Click to expand...
Click to collapse
Sent you an email with u/p if you need space.
test
anyway to test and make sure i did this correctly.. other than my phone booted and is not a paperweight
jriley60 said:
anyway to test and make sure i did this correctly.. other than my phone booted and is not a paperweight
Click to expand...
Click to collapse
To check the boot image, boot the phone normally, and then get a shell with adb. Type "id", and see if you are root
To check the recovery image, boot up the phone into recovery mode. Once you're in recovery mode, Press alt-l to show the text. The next to top line should say something like "using test keys"
JesusFreke said:
To check the boot image, boot the phone normally, and then get a shell with adb. Type "id", and see if you are root
To check the recovery image, boot up the phone into recovery mode. Once you're in recovery mode, Press alt-l to show the text. The next to top line should say something like "using test keys"
Click to expand...
Click to collapse
When will we see the files? Can you just upload to RS and we will mirror?
neoobs said:
When will we see the files? Can you just upload to RS and we will mirror?
Click to expand...
Click to collapse
Look at the original post. I added a link for the zip file..
boot.img is in correct. assuming typing id in telnet returning uid=0(root) gid=0(root) means i'm root then i'm good, thank you so much. looks like i really should install the emulator it might make things a little easier
JesusFreke said:
Look at the original post. I added a link for the zip file..
Click to expand...
Click to collapse
thank you. Sorry
jriley60 said:
boot.img is in correct. assuming typing id in telnet returning uid=0(root) gid=0(root) means i'm root then i'm good, thank you so much. looks like i really should install the emulator it might make things a little easier
Click to expand...
Click to collapse
Well, that does mean you have root, but that doesn't say anything about whether the boot.img was installed correctly. If you're telneting in, then you would have root access regardless of whether you are running a stock boot image or my modified one.
My boot image allows adb to connect to the phone as root. If you don't use adb, there's no reason to install my modified boot image.
Actually, there's an easier way to tell if you're running my boot image. Get to a command prompt (telnet, adb, terminal emulator app, whatever), and type
getprop ro.secure
If it says 0, then you correctly installed my boot image. Otherwise, if it says 1, you're still running the stock image.
Thanks! Was waiting for this.
Now to screw with my phone like crazy
Not that I don't trust you... but...
Ok... I don't trust you implicitly enough to reflash my phone with your stuff
Any chance you can post diffs against the android source tree so I can apply your changes and build it myself?
No offense - I just like to know what's going on...
RyeBrye said:
Ok... I don't trust you implicitly enough to reflash my phone with your stuff
Any chance you can post diffs against the android source tree so I can apply your changes and build it myself?
No offense - I just like to know what's going on...
Click to expand...
Click to collapse
Not at all
The recovery tool is just a stock build (almost) from the android source, using the test keys, which is the default if you don't specify keys of your own. The only change I made was to make it print out "using test keys" when it runs, just to make it easy to tell if it's running. I can give you a diff if you really want.. but it's a simple change though, and doesn't affect the actual functionality.
For the boot image, I replaced the initramfs image in the boot.img included in the official RC29 update, with the initramfs image from a default build of the android source, which has the ro.secure property set to 0.
I first tried the boot.img that was generated by the default android build, but I had issues with getting wifi to work, so I tried merging the initramfs image with the RC29 boot.img, and it seems to work fine.
I suspect you could accomplish the same thing by extracting the initramfs image from the RC29 boot.img, un-gzipping and un-cpioing it, and then modifying the default.prop file to set ro.secure to 0. Then you would have to package it back up and stick it back into the RC29 boot.img.
ro.secure is the property that the adb service looks at to determine if it should use root user, or drop to the shell user. When ro.secure is 0, adb will run as root.
It can be a bit of a pain to get the android source to build though. Make sure you get the dream specific product files (they aren't downloaded by default when you do a "repo sync"). You'll also encounter issues where it can't find libaudio.so or librpc.so. You'll have to copy these from the phone to a couple of output folders in order for the build to proceed.
If you get stuck, feel free to give me a holler and I'll try and help out.
Be warned.. the build takes quite a while.. on the order of an hour or two at least. But then again, I was doing it in a VM.. it may be faster if you do it on a native linux box.
i cant get it to work i know I'm doing something wrong can you(everyone)help me out(i have Vista 64) i get this error
this i what i type​# C:\Android\AndroidMod>adb push recovery_testkeys.img /data/local/recovery.img​
this is the error​C:AndroidAndroidMod: not found​
please and thank you
EDIT: could we do it off the sdcard?
EDIT2: i think i found my own mistake this cant be done in Windows i need to have shell with adb meaning time to whip out VM
JesusFreke said:
For the boot image, I replaced the initramfs image in the boot.img included in the official RC29 update, with the initramfs image from a default build of the android source, which has the ro.secure property set to 0.
I first tried the boot.img that was generated by the default android build, but I had issues with getting wifi to work, so I tried merging the initramfs image with the RC29 boot.img, and it seems to work fine.
Click to expand...
Click to collapse
Can you talk more about this step of the process? How did you do this "merging"? Did you use mkbootimg?
JesusFreke said:
I suspect you could accomplish the same thing by extracting the initramfs image from the RC29 boot.img, un-gzipping and un-cpioing it, and then modifying the default.prop file to set ro.secure to 0. Then you would have to package it back up and stick it back into the RC29 boot.img.
Click to expand...
Click to collapse
And this could be done without going through the whole process of doing an Android build, right? I'm just thinking about how one might build a simple utility to allow editing of the ramdisk.
alansj said:
Can you talk more about this step of the process? How did you do this "merging"? Did you use mkbootimg?
Click to expand...
Click to collapse
I just used the good ol hex-editor. The gzip file starts with a few specific bytes (don't remember them offhand..), so you can search through the image. There are 2 gzip files, the initramfs is the last one. In mine, it starts at offset 0x00154000.
Once you find it, just cut it out and dump the new one in (there is some 00 padding after the gzip file ends.. not sure if you need to keep the padding or not). You also have to update the size of the initramfs, which is at offset 0x00000010.
alansj said:
And this could be done without going through the whole process of doing an Android build, right? I'm just thinking about how one might build a simple utility to allow editing of the ramdisk.
Click to expand...
Click to collapse
Yes.
Anyway to make this using the update.zip sd card method?
JesusFreke, per some requests in #android on freenode I have setup a wiki (not a device wiki like xda's but more like an "information about android/g1 and how to tweak it" wiki) and would like to put this on there. Let me know if you care (unless you would like to add it in your own words), the wiki is http://android-dls.com/wiki and its still very new, but im trying to to get it built up (RyeBrye is doing most of the work).
humble said:
i cant get it to work i know I'm doing something wrong can you(everyone)help me out(i have Vista 64) i get this error
this i what i type​# C:\Android\AndroidMod>adb push recovery_testkeys.img /data/local/recovery.img​
this is the error​C:AndroidAndroidMod: not found​
please and thank you
EDIT: could we do it off the sdcard?
Click to expand...
Click to collapse
First of, you do know that when we refer to "C:\..." we refer to windows via a command prompt (or "cmd") and when you see "# ..." we refer to a shell connection to the Android phone.
Second, you do have the Android SDK right? If not download it HERE. Now extract that to a folder, preferably close to the C: root. (ex. C:\AndroidSDK)
1)Either extract/copy the files from the "AndroidMod.zip" to the Android Tools folder from the SDK (ex. C:\AndroidSDK\Tools) OR copy "adb.exe" and "AdbWinApi.dll" from the Android Tools folder from the SDK (ex. C:\AndroidSDK\Tools)to the folder where you have extracted the "AndroidMod.zip" to.
2)Open up a command prompt. Start -> Run (or Windows key + R) and type "cmd"
3)CD to the directory where the files are.
EXAMPLE:
C:\Users\[your_user_name_here]> cd \
C:> cd androidsdk\tools
C:\AndroidSDK\Tools>
4) Now follow the Instructions.

Testing ROM Images in the SDK Emulator!

I started looking at Android Development and got the whole Dev kit and the Eclipse enrionment setup and working fine.
The question I have is that I would try different apps I develop on the different ROMs available.
How do I get any of the new ROMs, like the HERO ROM ZIP files I can download to run in the emulator or is it even possible?
Im assuming that the system.img file in the SDK id the file I need to replace or re-create, but how is this done?
I am a noob to the develop stuff so step by step instructions would be much appreciated.
I also think this would be great for other developers and ROM makers to be able to test in this way.
Thanks
Simon
Hopefully THIS one dont get closed, it IS asking a development question...anyway,
I would like to know this as well. I would like to test things myself (getting better at manipulating them), and would like to know what he is asking as well.
Thanks.
I don't think this would work, as the ROMs are hardware depending, me thinks. Or at the least the kernel and drivers are.
maybe this will help, maybe not, just an emulator primer, so maybe people can jump on board with this
under <sdk path>/tools
to list out your AVD(android virtual device)
android list targets
will return:
Available Android targets:
id:1
Name: Android 1.1
Type: platform
API level: 2
Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
id:2
Name: Android 1.5
Type: platform
API level: 3
Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
id:3
Name: Google APIs
Type: add-on
Vendor: Google Inc.
Description: Android + Google APIs
Based on Android 1.5 (API level 3)
Libraries:
* com.google.android.maps (maps.jar)
API for Google Maps
Skins: HVGA (default), HVGA-L, QVGA-P, HVGA-P, QVGA-L
from here we choose our integer target, lets say 2
creating an AVD:
android create avd -n your_chosen_name_here -t 2
When you create an AVD, the android tool creates a dedicated directory for it on your development computer. The directory contains the AVD configuration file, the user data image and SD card image (if available), and any other files associated with the device. Note that the directory does not contain a system image — instead, the AVD configuration file contains a mapping to the system image, which it loads when the AVD is launched.
By default, the android tool creates the AVD directory inside ~/.android/avd/ (on Linux/Mac), C:\Documents and Settings\<user>\.android\ on Windows XP, and C:\Users\<user>\.android\ on Windows Vista
Click to expand...
Click to collapse
to run your newly created AVD:
emulator -avd your_chosen_name_here
maybe this will help, but I'm guessing everyone here already knows all of this.
references:
http://developer.android.com/guide/developing/tools/emulator.html#starting
Yeah, I understand that you can specify the AVD.
The only thing now is to edit the AVD to point to a different image. This is easy!
The system image file is a *.img file.
So how do we get our ROM images compiled into the IMG file format?
There must be a tool, but I cant find anything.
And what hardware does the emulator, emulate? Maybe it ignores the hardware specific calls throu an API so the ROM image target hardware shouldn't matter.
I just started messing around with rom's and after I build one I put system.img userdata.img and ramdisk.img from my /mydroid/out folder into the sdk's image folder and start the and it uses the new rom when I start the emulator
thats the easy part
do a nandroid backup
copy the sdk/platforms/android-1.5
to something like sdk/platforms/MINE
go to your AVD directory AVD/whateveryoucalledit
open up the config.ini
edit:
skin.name=HVGA
skin.path=platforms\MINE\skins\HVGA
image.sysdir.1=platforms\MINE\images\
go to your nandroid backup on your sdcard
copy system.img
go to sdk/platforms/MINE/images/
and paste the nandroid system.img
now run your AVD and it will boot that system.img
im running CyanogenMod rom right now in the emulator
hint* number pad 7 with numlock off in the emulator is how to open up the hardware keyboard
Awesome. I'll be giving this a try later.
One question: The apps are in the system.img file on the SDK images as far as I can tell. What do you do with all the apps in the new ROMs?
whatever you want to do with them, they're all there, even android market works perfectly
And where are you guys getting the system.img file from?
The ROM zip files dont have them.
Sorry....Im noob to this. LOL
ggolemg said:
whatever you want to do with them, they're all there, even android market works perfectly
Click to expand...
Click to collapse
OK, Im confused. Can you just unzip the ROM files and place in the folder that you point using the same folder structure?
OR
Do you have to have a system.img ?
Another thought:
I dont want to have to install all the ROMs just to create a Nandroid backup to get the images. There must be a way to create the images from the raw files in the ZIP files.
Any ideas?
UPDATE: The same technology used by Nandroid itself!
The google android emulator included in the google android sdk is limited. Although you can use 'adb push' to upload more tools, but one has to do it again next time. Follow the steps to create a enhanced system.img:
1. system.img is yaffs2 flash file system, so firstly you need the mkfs.yaffs2 tool, download it in the following link: Release Android Yaffs2 Tool (Both X86 And ARM). One has to be a registered user to download the tools.
2. use the 'adb push' to upload tools to android emulator, executables in /system/bin/, libraries in /system/lib, one can also create folder. One need change the file mode necessary.
3. upload the ARM mkfs.yaffs2 tool, use the following command to create system.img: # mkfs.yaffs2 /system /system.img
4. download the system.img to local with command 'adb pull', replace the system.img in your emulator folder/tools/lib/images/
Click to expand...
Click to collapse
so it seems like it would be just as much fun doing a nandroid backup
*edit*
so now the real question is, how do we go about ripping out the nandroid functionality to be able to do this locally?
*edit 2*
it is the mkfs.yaffs2 tool
Usage:
mkfs.yaffs2 yourdir yourimage
Ohsaka said:
NANDROID - CYGWIN DIRECTIONS (not not not, I repeat, not fully tested and verified yet)
Changes so far if you are using cygwin:
1) Make sure you have the 'netcat' and 'gcc' packages, else just run cygwin.exe again and get them.
You can test if you have them by running 'which nc' and 'which gcc', both commands should return /usr/bin/<command>
2) Compile the mkyaffs2image executable.
Inside the extracted nandroid archive directory, goto the tartools\yaffs2\utils\ directory (inside a cygwin prompt) and type 'make'.
This should generate a file named "mkyaffs2image.exe" which you need to place somewhere on your path.
(Hint: If you haven't downloaded the Android SDK, abort now. Wait for more explicit directions... Else, place the .exe where adb is, since it should be on your path already)
3) Edit the nandroid.sh script. (else you get a permission denied error when the script tries to run the dump_image-arm file)
Find the line:
adb push ./$tool /cache/$tool
Add the following line after it:
adb shell chmod 777 /cache/$tool
4) Make a managed mount named /tmp (else windows will puke on the long unix filenames with colons, etc)
mkdir /tmp
mount -o managed c:/cygwin/tmp /tmp (Note: change c:/cygwin to be the directory cygwin was installed to, you can find it by typing 'cd /' and then 'explorer .')
5) Follow the standard "tar + mkyaffs2image" directions to generate the last three .img files. They refer to the /tmp directory which you created in the previous step.
Viola! Looks like I have a complete backup image now...
$ ls -l
total 117504
-rw-r--r-- 1 Osaka None 2621440 Jun 12 21:31 boot.img
-rw------- 1 Osaka None 737088 Jun 12 22:07 cache.img
-rw------- 1 Osaka None 53570880 Jun 12 22:06 data.img
-rw-r--r-- 1 Osaka None 262144 Jun 12 21:31 misc.img
-rw-r--r-- 1 Osaka None 5242880 Jun 12 21:31 recovery.img
-rw------- 1 Osaka None 57885696 Jun 12 22:06 system.img
Now I just need to drink up the courage to test it on my phone!
Click to expand...
Click to collapse
ggolemg said:
so it seems like it would be just as much fun doing a nandroid backup
*edit*
so now the real question is, how do we go about ripping out the nandroid functionality to be able to do this locally?
*edit 2*
it is the mkfs.yaffs2 tool
Usage:
mkfs.yaffs2 yourdir yourimage
Click to expand...
Click to collapse
Is this for Linux (which I don't have) and if so, is there a Windows version?
short answer: yes its only for linux
long answer is a plea for help i posted in the nandroid thread about it:
I was wondering if there was a method to use the yaffs3 command to make a system.img from an unzipped rom placed on the sdcard through ADB, from what I've seen nandroid is almost exactly what I'm after.
The issue of why I can not just do this through linux, i can. I just want to be able to do it through windows some way without loading the entire rom on the phone and nandroiding the system.img out.
Either the aforementioned method, or the ability to mount a portion of my computers hard drive as a recognizable mountable partition within android running on the usb connected phone, loading the rom on that partition, unzipping it there, running ADB and making the system.img. But this way seems to bring up more problems than it's worth.
Or.. running the make yaffs3 command through ADB running the emulator with the rom unzipped on the virtual sdcard. This would actually be the best option as it would not require an actual phone.
I hope someone can help. Thank you very much.
Click to expand...
Click to collapse
hopefully someone knows the answer, I'm still trying though.
so on windows we would adb push the update.zip to the sdcard on the emulator
unzip it on the sdcard, there are apps for that
adb shell mkfs.yaffs2 sdcard/<extractedzipfilename>/system/ sdcard/system.img
adb pull the newly created system.img and proceed to load it in the emulator
i know im missing a ton here, please someone correct me
I'd love to be able to run these images in the emulator on windows!
ggolemg said:
thats the easy part
do a nandroid backup
copy the sdk/platforms/android-1.5
to something like sdk/platforms/MINE
go to your AVD directory AVD/whateveryoucalledit
open up the config.ini
edit:
skin.name=HVGA
skin.path=platforms\MINE\skins\HVGA
image.sysdir.1=platforms\MINE\images\
go to your nandroid backup on your sdcard
copy system.img
go to sdk/platforms/MINE/images/
and paste the nandroid system.img
now run your AVD and it will boot that system.img
im running CyanogenMod rom right now in the emulator
hint* number pad 7 with numlock off in the emulator is how to open up the hardware keyboard
Click to expand...
Click to collapse
Hm, the emulator just hangs on the ANDROID.. message, similar to when the standard system.img was in.
anyone figure out how to do this on a mac?
thanks if anyone can.
johnnylicious said:
anyone figure out how to do this on a mac?
thanks if anyone can.
Click to expand...
Click to collapse
I found this somewhere else and take no credit for it. I did shorten the steps.
Of course this is once you have the sdk installed on your mac
1. Run Terminal, and change to the 'tools' directory of the SDK (or add the tools directory to the path settings in ~/.profile).
2. Type './android list target'
3. Note the 'id' number of the '1.5' target (in my case it's '2')
4. Type './android create avd -n enhanced -t 2' (substitute 2 with the target number determined above if required)
5. You will be prompted to create a hardware profile. {You can leave as default no}
6. Use nandroid to create a backup then copy system.img
7. Copy file to ~/.android/avd/enhanced.avd/system.img
8. You're ready! Type './emulator -avd enhanced' to run! Note: inital boot may take a few minutes!
Can anyone post up the
Android Yaffs2 Tool (Both X86 And ARM)
for download? The above link doesn't work. I did a google search and all the D/L links are referring to the same location.
thanks!

[Q] IMEI Repair

I own the D-820 model of the phone. I was trying to change the PRL, and the IMEI is showing up as 0 now.
Having said that, I flashed the kernel with diagnostic mode enabled and installed LG United drivers. I was successful at getting the device SPC. Using DFS, I was able to change the "Ruim mode" as well. The changes got successfully written so far. Changing PRL screwed up the IMEI.
Ever since, I've been trying to set ESN, MEID and IMEI using DFS, CDMADevTerm, QPST NV Manager, and EFS Pro (Qualcomm NV Tools). All fail (the IMEI reverts to 0; the original IMEI does not get written back).
I have even tried changing the connection mode in Qualcomm NV Tools (EFS Pro) to factory test mode, before writing. It results in "Unknown" baseband and blank IMEI (upon dialing *#06# on the phone). "Low power" connection mode also fails to write the IMEI back.
I've read the MEID fields are secured in some way. Anybody have any pointers to make it work?
By the way, the phone accepts any 16-digit diagnostic password in the aforementioned tools. I've been told it may not apply to phones other than Samsung devices. Could it be possible the phone is waiting for the correct 16-digit password to "unlock" the MEID fields, and simply accepts other passwords but does NOT unlock the fields?
I have also tried flashing stock firmware, and it appears it wasn't the case where phone is not able to read the stored IMEI.
Anybody have any clues about the security used?
Writing IMEI isn't allowed to discuss over here since it's illegal. Just send it to a LG center and let them write it for you.
May be @bitdomo can help you will the partition/security query you've got
halfbytecode said:
Anybody have any clues about the security used?
Click to expand...
Click to collapse
I am not familiar with efs yet.
Maybe try to follow the guide about fix imei on lg g2. It could serve as a good base. http://forum.xda-developers.com/showthread.php?t=2701861
If you have a backup of your efs before you started editing the nvitems then restore it. It is important to make efs backup before you start to play with those kind of efs tools.
vin4yak said:
Writing IMEI isn't allowed to discuss over here since it's illegal. Just send it to a LG center and let them write it for you.
May be @bitdomo can help you will the partition/security query you've got
Click to expand...
Click to collapse
I'm just trying to fix my device here on my own, by writing back the IMEI found on my phone's sim tray, box, etc. I'm kind of broke these days, so it's hard.
bitdomo said:
I am not familiar with efs yet.
Maybe try to follow the guide about fix imei on lg g2. It could serve as a good base. http://forum.xda-developers.com/showthread.php?t=2701861
If you have a backup of your efs before you started editing the nvitems then restore it. It is important to make efs backup before you start to play with those kind of efs tools.
Click to expand...
Click to collapse
I had indeed tried out NV Manager in QPST, but it failed to write to item number 550 (IMEI).
In fact I found this exact same guide and a bunch of others too.
I'm kind of surprised it works on LG g2 and not for me on nexus 5.
Could it be possible the diagnostic mode that was enabled by modifying the kernel (found here on XDA) didn't enable it fully?
halfbytecode said:
I'm just trying to fix my device here on my own, by writing back the IMEI found on my phone's sim tray, box, etc. I'm kind of broke these days, so it's hard.
I had indeed tried out NV Manager in QPST, but it failed to write to item number 550 (IMEI).
In fact I found this exact same guide and a bunch of others too.
I'm kind of surprised it works on LG g2 and not for me on nexus 5.
Could it be possible the diagnostic mode that was enabled by modifying the kernel (found here on XDA) didn't enable it fully?
Click to expand...
Click to collapse
It could be. What if we find a lg g2 as a donor. You flash the efs from your nexus to lg g2 and try to fix it, then if it worked you move the fixed efs from lg g2 back to nexus 5.
Nexus 5 has a second recovery it is on the LAF partition, this is called download mode. By exteacting the ramdisk of it I found traces that it could be used with qpst. To enable it I have to edit the ramdisk. The file which have to be edited is usb.init.rc or something similar. I dont remember well.
I can extract ramdisk and change the content, but I dont know the command parameters for put the kernel image and the ramdisk together as a whole boot.img
bitdomo said:
It could be. What if we find a lg g2 as a donor. You flash the efs from your nexus to lg g2 and try to fix it, then if it worked you move the fixed efs from lg g2 back to nexus 5.
Nexus 5 has a second recovery it is on the LAF partition, this is called download mode. By exteacting the ramdisk of it I found traces that it could be used with qpst. To enable it I have to edit the ramdisk. The file which have to be edited is usb.init.rc or something similar. I dont remember well.
I can extract ramdisk and change the content, but I dont know the command parameters for put the kernel image and the ramdisk together as a whole boot.img
Click to expand...
Click to collapse
I'm not really sure where I could find a donor g2. The plan could work though.
The boot IMG with diag mode is on page 3 here http://forum.xda-developers.com/showthread.php?t=2535478 if you want to look.
I may be able to figure out how to put ramdisk together with the zimage (of the diag mode kernel above). I've analyzed some kernels which do it using updater-script. In the past I've also used tools like android kitchen (not sure about the exact name).
@bitdomo Are you referring to this file?
https://android.googlesource.com/device/lge/hammerhead/+/kitkat-release/init.hammerhead.usb.rc
halfbytecode said:
I'm not really sure where I could find a donor g2. The plan could work though.
The boot IMG with diag mode is on page 3 here http://forum.xda-developers.com/showthread.php?t=2535478 if you want to look.
I may be able to figure out how to put ramdisk together with the zimage (of the diag mode kernel above). I've analyzed some kernels which do it using updater-script. In the past I've also used tools like android kitchen (not sure about the exact name).
Click to expand...
Click to collapse
hm... comparing the laf ramdis and the diag enabled ramdisk I have to say that I was wrong, but still this is a interesting thing in the init.laf.usb.rc file:
# it can run as user cable for QCT PID
on property:ro.boot.laf=QCOM
wait /sys/class/android_usb/android0/enable
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 05C6
write /sys/class/android_usb/android0/idProduct 903A
write /sys/class/android_usb/android0/f_acm/acm_transports tty
write /sys/class/android_usb/android0/f_diag/clients diag
write /sys/class/android_usb/android0/functions mtp,laf
write /sys/class/android_usb/android0/enable 1
Click to expand...
Click to collapse
What could this QCT PID be? I thought these are the lines for teh diag mode.
Here is the laf image with extracted ramdisk and some from here to build the kernel
You could also try this early key lime pie rom. This is an internal test version of android 4.4 from september or august. Maybe this kernel can be used to enable diag mode. If I remember well it may have an app called hidden menu where you can change the usb port settings so you dont need root an use adb commands. Before you flash it backup you misc partition because at the first booting this rom will change the device factory version string on the misc partition to something else which will cause cause that LG flashtool will stop wokring for you device unless you change that string back from "FACTORY" to "USER"
to backup your misc: dd if=/dev/block/platform/msm_sdcc.1/by-name/misc of=/sdcard/misc.img
from your sdcard copy it to you pc just for safety reasones
To return to stock flash back any stock rom from google then restore your misc partition using this command:
dd if=/sdcard/misc.img of=/dev/block/platform/msm_sdcc.1/by-name/misc
Well that is really intriguing. I was oblivious to the laf mode. I did know about .tot files and lg flash tool, but nothing more than that.
I see laf has seprate a kernel and a ramdisk, which is what you were talking about all along. It makes sense to me now.
I will give this a shot when I have some free time on my hands and will let you know.
Thanks for the key lime pie leak too!
halfbytecode said:
Well that is really intriguing. I was oblivious to the laf mode. I did know about .tot files and lg flash tool, but nothing more than that.
I see laf has seprate a kernel and a ramdisk, which is what you were talking about all along. It makes sense to me now.
I will give this a shot when I have some free time on my hands and will let you know.
Thanks for the key lime pie leak too!
Click to expand...
Click to collapse
I already extracted it for you, the original laf is the "laf.img" everything is untouched.
bitdomo said:
I already extracted it for you, the original laf is the "laf.img" everything is untouched.
Click to expand...
Click to collapse
Yes I will give that a shot soon and see what happens. Thanks for the help so far.
@bitdomo I modified the file that you mentioned, swapping USER and QCOM lines. Repacked the ramdisk, and then put together the laf image by supplying the base address, ramdisk address, command line value and page size from the the original laf dump. I flashed it on my phone using Terminal Emulator using the following command:
Code:
dd if=/sdcard/laf1.img of=/dev/block/platform/msm_sdcc.1/by-name/laf
Now when I connect the phone in download mode, the phone is stuck at the tiny "Download Mode" logo and windows does not detect any USB device.
Further, I observed the original dump size is 22 MB and the repacked laf image size is merely 13.2 MB. The size of the extracted kernel and ramdisk sums up to 13.2 MB.
It gets me to think these tools are missing out on the remaining stuff in the laf image. Ive uploaded the modified laf image. https://www.sendspace.com/file/f31xi1
I didn't read these posts just wanted to share my experience...
This happened to me 2x months and months ago ( lost Imei) I don't remember what I was doing to cause it but the only thing that fixed it for me was my TWRP backup . my backup efs file did nothing factory IMG did nothing and everything else I tries did nothing . agn this probably helps u NONE but wanted share anyways ...
Tampering with the imei is illegal
Sent from my Nexus 5
drawde40599 said:
I didn't read these posts just wanted to share my experience...
This happened to me 2x months and months ago ( lost Imei) I don't remember what I was doing to cause it but the only thing that fixed it for me was my TWRP backup . my backup efs file did nothing factory IMG did nothing and everything else I tries did nothing . agn this probably helps u NONE but wanted share anyways ...
Click to expand...
Click to collapse
Yes, it may help someone reading this thread.
dicecuber said:
Tampering with the imei is illegal
Sent from my Nexus 5
Click to expand...
Click to collapse
Just trying to restore the IMEI. I'm not attempting to do something illegal.
halfbytecode said:
@bitdomo I modified the file that you mentioned, swapping USER and QCOM lines. Repacked the ramdisk, and then put together the laf image by supplying the base address, ramdisk address, command line value and page size from the the original laf dump. I flashed it on my phone using Terminal Emulator using the following command:
Code:
dd if=/sdcard/laf1.img of=/dev/block/platform/msm_sdcc.1/by-name/laf
Now when I connect the phone in download mode, the phone is stuck at the tiny "Download Mode" logo and windows does not detect any USB device.
Further, I observed the original dump size is 22 MB and the repacked laf image size is merely 13.2 MB. The size of the extracted kernel and ramdisk sums up to 13.2 MB.
It gets me to think these tools are missing out on the remaining stuff in the laf image. Ive uploaded the modified laf image. https://www.sendspace.com/file/f31xi1
Click to expand...
Click to collapse
@bitdomo I compared the original laf dump and my modified image using a hex editor.
Just as I had suspected, the original dump is padded with zeros. Disregarding that, their actual size looks similar.
So I take back what I said about the tools not being able to extract from the laf image completely.
Do you know what could be the issue here?
EDIT: There was an interesting tidbit from unmkbootimg output. (The full command line output is attached with this post, ramdisk was repacked separately using the tool in the package - not in the output)
Code:
*** WARNING ****
This image is built using NON-standard mkbootimg!
OFF_KERNEL_ADDR is 0xFD908100
OFF_RAMDISK_ADDR is 0x00200100
OFF_SECOND_ADDR is 0xFE800100
Please modify mkbootimg.c using the above values to build your image.
****************
Could compiling mkbootimg with the above be of any help, since the mkbootimg had been modified to include ramdisk address parameter in the links you posted?
halfbytecode said:
@bitdomo I compared the original laf dump and my modified image using a hex editor.
Just as I had suspected, the original dump is padded with zeros. Disregarding that, their actual size looks similar.
So I take back what I said about the tools not being able to extract from the laf image completely.
Do you know what could be the issue here?
EDIT: There was an interesting tidbit from unmkbootimg output. (The full command line output is attached with this post, ramdisk was repacked separately using the tool in the package - not in the output)
Code:
*** WARNING ****
This image is built using NON-standard mkbootimg!
OFF_KERNEL_ADDR is 0xFD908100
OFF_RAMDISK_ADDR is 0x00200100
OFF_SECOND_ADDR is 0xFE800100
Please modify mkbootimg.c using the above values to build your image.
****************
Could compiling mkbootimg with the above be of any help, since the mkbootimg had been modified to include ramdisk address parameter in the links you posted?
Click to expand...
Click to collapse
what was the command you used to put the kernel and the modified ramdisk together?
halfbytecode said:
Yes, it may help someone reading this thread.
Just trying to restore the IMEI. I'm not attempting to do something illegal.
Click to expand...
Click to collapse
U no what I just remembered how I lost my IMEI back then . I was updating to 4.4.3 from factory .IMG and did the command "Fastboot wipe cache" after fastbooting the system.IMG . ( I no it makes no sense) but that's how mine was lost . now I just Fastboot system.IMG with new updates no wipe cache and works perfect . but ya a restore of TWRP was only thing that fixed it .
bitdomo said:
what was the command you used to put the kernel and the modified ramdisk together?
Click to expand...
Click to collapse
I used
Code:
mkbootimg --kernel laf_dump.img-kernel --ramdisk new-ramdisk.cpio.gz --base 0x026fff00 --cmdline '"console=ttyHSL0,115200,n8 androidboot.hardware=hammerhead user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1"' --pagesize 2048 --ramdiskaddr 0x02900000 -o laf_q_mod_3.img
Just a note, this is the modified mkbootimg which has "ramdiskaddr" parameter (from the thread you linked to in one of your previous posts). Version shipped with bbqlinux distribution has "ramdisk_offset" instead. The original version does not have either, as you may know.

Auto Boot / Start on charge (different devices)

Hello all,
i would like to buy a new (cheap) tablet which i can modify to auto boot / start on charge. I need this for an project. I plan to use this tablet as a mediaplayer in my new bathroom and the buttons of this tablet will not be reachable. Is it possible to modify every device to auto boot on charge or has someone experience with devices not working?
Thx and greetings
gigi
Sorry OP
i want to hijack this thread to to compile all successful method for different devices to autoboot when plug in /charging
any one to do this must root their device and use AIK to decompile/recompile boot.image, modify certain file depending on the device
---------- Post added at 05:35 PM ---------- Previous post was at 05:23 PM ----------
]REDMI 6A MTK Device
need to modify kopc_charger file
here
https://forum.xda-developers.com/showpost.php?p=81874791&postcount=158
https://forum.xda-developers.com/showpost.php?p=81880927&postcount=159
---------- Post added at 05:45 PM ---------- Previous post was at 05:35 PM ----------
On I9500 runing linage OS 16
modify the init.rc
on charger
setprop ro.bootmode "normal"
setprop sys.powerctl "reboot"
---------- Post added at 06:03 PM ---------- Previous post was at 05:45 PM ----------
Redmi 4x
modify init.rc
on charger
class_start charger
class_stop charger
on property:sys.boot_from_charger_mode=1
trigger late-init
Samsung S5 (klte)
Working Roms: lineage-15.1
stock 6
modify init.rc:
on charger
setprop ro.bootmode "normal"
setprop sys.powerctl "reboot"
tried the same with samsung s3 mini (kminilte) but not working
HI there, i have installed this Rom to my samsung s8, it is pretty cool, and i am trying to set auto boot on USB power pluggin, but until now, no luck.
Since Android 10, seems the init.rc is regenerated every time when it boots, so unpack/repack of the .img solution seems not working any more. what i am trying next is via magisk module, still in process but no progress.
Is there any other way to do this? any light would be appreciated.
tonyniu2008 said:
HI there, i have installed this Rom to my samsung s8, it is pretty cool, and i am trying to set auto boot on USB power pluggin, but until now, no luck.
Since Android 10, seems the init.rc is regenerated every time when it boots, so unpack/repack of the .img solution seems not working any more. what i am trying next is via magisk module, still in process but no progress.
Is there any other way to do this? any light would be appreciated.
Click to expand...
Click to collapse
The init.rc is unpacked from the boot partition, you see in / only a copy of init.rc
What other solutions did you try to make it boot instantly?
hisoka_simp said:
The init.rc is unpacked from the boot partition, you see in / only a copy of init.rc
What other solutions did you try to make it boot instantly?
Click to expand...
Click to collapse
I tried to unpack the boot image, and actually the init.rc is missing from the root path, i googled it, as i think it caused by the system version, starting from Android 10, init.rc will be only generated when booting, my system is LineageOS 17.1
when the system finishing booting, i can adb shell to the file, init.rc is there then, i tried to unpack the recovery image, the init.rc is there, i tried to change that and flash to boot, and recovery, no luck, after booting the init.rc still keep the same as before.
I am currently trying the magisk module, but not yet a solution.
As you said the init.rc is copyed from somewhere, do you know where?
tonyniu2008 said:
I tried to unpack the boot image, and actually the init.rc is missing from the root path, i googled it, as i think it caused by the system version, starting from Android 10, init.rc will be only generated when booting, my system is LineageOS 17.1
when the system finishing booting, i can adb shell to the file, init.rc is there then, i tried to unpack the recovery image, the init.rc is there, i tried to change that and flash to boot, and recovery, no luck, after booting the init.rc still keep the same as before.
I am currently trying the magisk module, but not yet a solution.
As you said the init.rc is copyed from somewhere, do you know where?
Click to expand...
Click to collapse
Can you send me a link (google drive would be nice) to an unmodified version of your boot.img? I'll modify it correctly and send back to you
hisoka_simp said:
Can you send me a link (google drive would be nice) to an unmodified version of your boot.img? I'll modify it correctly and send back to you
Click to expand...
Click to collapse
It is so kind of you, you can find my TWRP backup image here: https://drive.google.com/file/d/1dtdovnRIZY58SYqFBNEgT4TafktmAycd/view?usp=sharing
just have a clean backup there. but as i unpacked, there is no init.rc under root, hope you know a way for this.
Let me know if you found something, thx
hisoka_simp said:
Can you send me a link (google drive would be nice) to an unmodified version of your boot.img? I'll modify it correctly and send back to you
Click to expand...
Click to collapse
The content of ramdisk is extracted from the boot partition every time it starts, so modifying init.rc does not work.
I extracted my boot partition to boot.img, then unpacked it, modified the init.rc inside, repackaged it as boot.img, and finally flashed into the boot partition
After the system started, I saw that the init.rc was modified
But it’s not pungent and has no effect
on charger
class_start charger
setprop sys.powerctl reboot
My device is huawei MediaPad3,maybe your device can work。Try it
tonyniu2008 said:
I tried to unpack the boot image, and actually the init.rc is missing from the root path, i googled it, as i think it caused by the system version, starting from Android 10, init.rc will be only generated when booting, my system is LineageOS 17.1
when the system finishing booting, i can adb shell to the file, init.rc is there then, i tried to unpack the recovery image, the init.rc is there, i tried to change that and flash to boot, and recovery, no luck, after booting the init.rc still keep the same as before.
I am currently trying the magisk module, but not yet a solution.
As you said the init.rc is copyed from somewhere, do you know where?
Click to expand...
Click to collapse
The content of ramdisk is extracted from the boot partition every time it starts, so modifying init.rc does not work.
I extracted boot partition to boot.img, then unpacked it, modified the init.rc , repackaged it as boot.img, and finally flashed into the boot partition
After the system started, I saw that the init.rc was modified
But it’s no effect
on charger
class_start charger
setprop sys.powerctl reboot
My device is huawei MediaPad3,maybe your device can work。Try it
bearllm said:
The content of ramdisk is extracted from the boot partition every time it starts, so modifying init.rc does not work.
I extracted boot partition to boot.img, then unpacked it, modified the init.rc , repackaged it as boot.img, and finally flashed into the boot partition
After the system started, I saw that the init.rc was modified
But it’s no effect
on charger
class_start charger
setprop sys.powerctl reboot
My device is huawei MediaPad3,maybe your device can work。Try it
Click to expand...
Click to collapse
Hey I recommend you to also try this code which worked for another device I had, hope it works
on charger
setprop ro.bootmode "normal"
setprop sys.powerctl "reboot"
hisoka_simp said:
Hey I recommend you to also try this code which worked for another device I had, hope it works
on charger
setprop ro.bootmode "normal"
setprop sys.powerctl "reboot"
Click to expand...
Click to collapse
Thanks,I tried it last night,It does not work : (
I think Huawei’s program entry is not here
BTW,i use the APP "Tasker",my device can automatically shut down when the usb line is unplugged
hisoka_simp said:
Hey I recommend you to also try this code which worked for another device I had, hope it works
on charger
setprop ro.bootmode "normal"
setprop sys.powerctl "reboot"
Click to expand...
Click to collapse
I think i did it
in the "init.charger.rc"
on charger
chmod 0440 /sys/class/hw_power/battery/isc
chown system system /sys/class/hw_power/battery/isc
trigger cust_parse_action
class_start charger
wait /dev/block/bootdevice/by-name/oeminfo
start oeminfo_nvm
start teecd
change to
on charger
chmod 0440 /sys/class/hw_power/battery/isc
chown system system /sys/class/hw_power/battery/isc
trigger cust_parse_action
class_start charger
setprop ro.bootmode "normal"
setprop sys.powerctl "reboot"
wait /dev/block/bootdevice/by-name/oeminfo
start oeminfo_nvm
start teecd
the new problem is coming
when i flash the repacked into my device,i can't enter developer options
I tried not to make any changes, just package boot.img with the unpacked file, the same situation
but i flash the boot.img from my boot partition,everything is ok
You
bearllm said:
I think i did it
in the "init.charger.rc"
on charger
chmod 0440 /sys/class/hw_power/battery/isc
chown system system /sys/class/hw_power/battery/isc
trigger cust_parse_action
class_start charger
wait /dev/block/bootdevice/by-name/oeminfo
start oeminfo_nvm
start teecd
change to
on charger
chmod 0440 /sys/class/hw_power/battery/isc
chown system system /sys/class/hw_power/battery/isc
trigger cust_parse_action
class_start charger
setprop ro.bootmode "normal"
setprop sys.powerctl "reboot"
wait /dev/block/bootdevice/by-name/oeminfo
start oeminfo_nvm
start teecd
the new problem is coming
when i flash the repacked into my device,i can't enter developer options
I tried not to make any changes, just package boot.img with the unpacked file, the same situation
but i flash the boot.img from my boot partition,everything is ok
Click to expand...
Click to collapse
I removed the whole code in the on charger block and pasted just mine so in the block is ONLY those 2 commands.
This maybe results in an error bc charger class is started but not properly shutdown.
Another error could be the file, idk if there is a global init.rc in your boot.img if yes then search in there for on charger bc the global init.rc is called at first and only after that the others so maybe look if there is an on charger block in the unpacked boot img in the init.rc
But I don't know why you can't access the developer options anymore, it would help me to do if you explain a bit more detailed what's going on when you try to open them
hisoka_simp said:
You
I removed the whole code in the on charger block and pasted just mine so in the block is ONLY those 2 commands.
This maybe results in an error bc charger class is started but not properly shutdown.
Another error could be the file, idk if there is a global init.rc in your boot.img if yes then search in there for on charger bc the global init.rc is called at first and only after that the others so maybe look if there is an on charger block in the unpacked boot img in the init.rc
But I don't know why you can't access the developer options anymore, it would help me to do if you explain a bit more detailed what's going on when you try to open them
Click to expand...
Click to collapse
ok
this is my test
step1
I extracted boot.img from the boot partition.
step2
unpack boot.img to the folder “unpacked_img”
step3
repacked the folder “unpacked_img” to the RepackBoot.img (Did not change any files in the folder, just repacked)
step4
flah the RepackBoot.img to the boot partition
i can't access the developer options anymore
but i flash the boot.img(step1) to the boot partition
i can access the developer options again
think you so much
bearllm said:
ok
this is my test
step1
I extracted boot.img from the boot partition.
step2
unpack boot.img to the folder “unpacked_img”
step3
repacked the folder “unpacked_img” to the RepackBoot.img (Did not change any files in the folder, just repacked)
step4
flah the RepackBoot.img to the boot partition
i can't access the developer options anymore
but i flash the boot.img(step1) to the boot partition
i can access the developer options again
think you so much
Click to expand...
Click to collapse
bearllm said:
ok
this is my test
step1
I extracted boot.img from the boot partition.
step2
unpack boot.img to the folder “unpacked_img”
step3
repacked the folder “unpacked_img” to the RepackBoot.img (Did not change any files in the folder, just repacked)
step4
flah the RepackBoot.img to the boot partition
i can't access the developer options anymore
but i flash the boot.img(step1) to the boot partition
i can access the developer options again
think you so much
Click to expand...
Click to collapse
Did you try to unlock developer options again? (Tapping build number 10x)
hisoka_simp said:
Did you try to unlock developer options again? (Tapping build number 10x)
Click to expand...
Click to collapse
I have tried, failed~~~~~~~
and i reset pad to factory settings, do not open the developer options first,flash the RepackBoot.img
unlock developer options after reboot
the situation is still the samet,can't access the developer options
my heart is broken,hahaha
bearllm said:
I have tried, failed~~~~~~~
and i reset pad to factory settings, do not open the developer options first,flash the RepackBoot.img
unlock developer options after reboot
the situation is still the samet,can't access the developer options
my heart is broken,hahaha
Click to expand...
Click to collapse
What do you mean exactly you can't access? Is the toast not showing which says you unlocked developer options or do you try to open them and settings crash then?
hisoka_simp said:
What do you mean exactly you can't access? Is the toast not showing which says you unlocked developer options or do you try to open them and settings crash then?
Click to expand...
Click to collapse
i can unlocked developer options ,but when i click the "developer options ",the program crashes
hello.
one year ago, i can modify my xiaomi mix2s with xiaomi.eu rom. and the phone boots when the charger is connected. The modification i make power the phone, apears the chargin animation and after a second, the phone reboots and launch android.
The problem is, i must factory reset the phone and now, this not works, and i must do the trick again. but i dont remember what i did!!!!
somebody know how to modify the phone to boot when charger is connected??

[GUIDE] How to fix the touchscreen in TWRP (Moto G 5G)

In this guide a describe how you can easily fix the touchscreen issue in TWRP for Moto G 5G.
Before providing the necessary steps, I would like to express my gratitude to the guys here, especially Andrew Hexen for providing the sources and instructions to build the TWRP for this great device.
Building the TWRP from source might result in a recovery without the touchscreen support. To fix that, you can follow these simple steps.
First, we need to extract the touchscreen drivers from the phone. To do this, you need to boot to TWRP. Connect your phone to your PC, open up the terminal and type:
Bash:
# reboot to bootloader
adb reboot bootloader
# boot to recovery
fastboot boot twrp.img
Wait for the phone to boot to recovery. If your phone uses password/PIN or other forms of protection you might have to decrypt the filesystem before proceeding. You can use OTG mouse to do that.
On your PC, in terminal type:
Bash:
adb pull "/vendor/lib/modules/" <path to where you want the modules folder to be pulled>
This will pull from the phone all the necessary drivers, among those are the drivers for the touchscreen. (Probably you could pull just the touchscreen driver, but to be sure I pulled everything.)
On you PC, use Android Kitchen to unpack the recovey image. I usually use the terminal to go to the Android Kitchen folder and I run:
Bash:
./unpacking.sh <path to your twrp.img>
Then go to ramdisk folder that was created by Android Kitchen
Bash:
cd ramdisk
and manually create the following folder:
Bash:
sudo mkdir -p vendor/lib/modules
Then copy the drivers you previously pulled from your phone to this folder:
Bash:
sudo cp <path to modules folder with drivers>/* vendor/lib/modules/
In the ramdisk folder open the init.rc file. We need to open it as su user. You can use:
Bash:
sudo gedit
and then open the file from the editor.
Find the following lines:
Code:
# Load properties, Android 6.0+, vendor init lives here
on load_persist_props_action
load_persist_props
and add a line after load_persist_props so that you get:
Code:
# Load properties, Android 6.0+, vendor init lives here
on load_persist_props_action
load_persist_props
start load_modules # this is the line you must add
Use Android Kitchen to repack the image:
Bash:
cd .. # to move back to the folder where Android Kitchen is
./repacking.sh
You'll get a file called image-new.img. That's your new recovery with a working touchscreen!
I'm sure there's a better way to do this so feedback is welcome.
I tired your method and completed with a newimage file, and flastboot booted off it. Still had touch problems, files attached. Vendor.zip was placed in ramdisk\vendor\lib\modules. Any ideas?
Thankyou
PS (edit): would anything needed to be added to ramdisk/vendor/manifest.xml?
Lostwon said:
I tired your method and completed with a newimage file, and flastboot booted off it. Still had touch problems, files attached. Vendor.zip was placed in ramdisk\vendor\lib\modules. Any ideas?
Thankyou
Click to expand...
Click to collapse
Lostwon said:
I tired your method and completed with a newimage file, and flastboot booted off it. Still had touch problems, files attached. Vendor.zip was placed in ramdisk\vendor\lib\modules. Any ideas?
Thankyou
PS (edit): would anything needed to be added to ramdisk/vendor/manifest.xml?
Click to expand...
Click to collapse
PPS I am trying this on the Moto G stylus xt2043-4. I just noticed thats not the phone you wrote this for, Im going to pull and umpack my stock recovery and compre that to the Twrp3.4 image and see whats missing .

Categories

Resources