I need help with the updater-script for flashing STOCK ROM - HTC Desire 510
Hello everyone.
Let's get right to the point. I found TWRP Backup files of the STOCK ROM for HTC Desire 510 64-bit. When I restore them with TWRP it all goes great. But I don't always want to restore so I decided to make a flashable zip file. I extracted all the files from system.ext4.win000 and system.ext4.win001 and combined them in to one folder. Then I used this tool http://forum.xda-developers.com/showthread.php?t=2747279 to make my update-script. This is the part where I spent 4 hours to learn and fix errors in my script. But I finally did it :victory::victory: . But when I rebooted the phone, it just hanged and rebooted itself in to recovery mode :crying:
This is my update-script:
Code:
ui_print("HTC Sense 6 Android 4.4.3");
ui_print("Only for HTC Desire 510 64-bit");
show_progress(1.000000, 0);
ui_print("Mounting /system");
mount("ext4", "EMMC", "/dev/block/mmcblk1p21", "/system");
set_progress(0.200000);
ui_print("Extracting files to /system");
package_extract_dir("system", "/system");
set_progress(0.400000);
ui_print("Setting permissions");
set_perm_recursive(0,0,0755, 0644, "/system");
set_progress(0.500000);
ui_print("Please wait, boot.img being flashed...");
package_extract_file("boot.img", "/tmp/boot.img");
write_raw_image("/tmp/boot.img", "boot");
delete("/tmp/boot.img");
set_progress(0.600000);
ui_print("Boot image has been flashed");
set_progress(0.800000);
ui_print("Unmounting /system");
unmount("/system");
set_progress(0.900000);
ui_print("Update complete.");
set_progress(1.000000);
Could my permissions be wrong? Should I try with Philiz Touch Recovery? Or any other suggestion would be very grateful.
I just found out that the boot.img isn't being flashed properly, so after I flashed the ZIP I used fastboot to flash the boot.img manually but with no luck. It still reboots in to recovery.
I found out that the system is actually on /dev/block/mmcblk0p50. I tried this way but still nothing. I even tried with /dev/block/mmcblk1p50 but still no luck. Could the ROM be missing some files? Any help would be appreciated.
I read that it could be an update-binary problem. So I tried with different binaries but nothing. At this point I'm out of options.
denny.hell said:
I read that it could be an update-binary problem. So I tried with different binaries but nothing. At this point I'm out of options.
Click to expand...
Click to collapse
It's simply because you aren't s-off and dont have the correct permissions. However if you're looking for a stock 64 bit rom than I have one.
MrMike2182 said:
It's simply because you aren't s-off and dont have the correct permissions. However if you're looking for a stock 64 bit rom than I have one.
Click to expand...
Click to collapse
I don't think that this has anything to do with s-on/off. My bootloader is unlocked, I have TWRP. I have access to the system partition. I'm having trouble with programming the updater-script in the META-INF folder. I can't make it to flash properly.
But I think that I forgot to sign the ZIP archive. I have to try that.
I already have three stock backup files. I have one from the UK(don't know the operator), another one from Australian Telstra and from Romanian Orange. (I think that one of them is from you actually. I found it here on XDA) But thanks for offering it
This is a little off topic, but could I ask you for some help? It's about porting MIUI to this phone. I started it. I have everything set up. I made the first patch. And I've got rejects that I need to fix manually. I read two tutorials about rejects but I'm having trouble understanding them. Could you help me out here....give some guidelines....?
denny.hell said:
I don't think that this has anything to do with s-on/off. My bootloader is unlocked, I have TWRP. I have access to the system partition. I'm having trouble with programming the updater-script in the META-INF folder. I can't make it to flash properly.
But I think that I forgot to sign the ZIP archive. I have to try that.
I already have three stock backup files. I have one from the UK(don't know the operator), another one from Australian Telstra and from Romanian Orange. (I think that one of them is from you actually. I found it here on XDA) But thanks for offering it
This is a little off topic, but could I ask you for some help? It's about porting MIUI to this phone. I started it. I have everything set up. I made the first patch. And I've got rejects that I need to fix manually. I read two tutorials about rejects but I'm having trouble understanding them. Could you help me out here....give some guidelines....?
Click to expand...
Click to collapse
You still need s-off to access and write anything to those partitions you're talking about otherwise anything you try to write to them isn't going to work... Now about the rejects, which parts are you referring to that need manual fixing?
Also, how and what have you done to port or start working on the rom?
MrMike2182 said:
You still need s-off to access and write anything to those partitions you're talking about otherwise anything you try to write to them isn't going to work... Now about the rejects, which parts are you referring to that need manual fixing?
Also, how and what have you done to port or start working on the rom?
Click to expand...
Click to collapse
Thank you for putting an interest in this. I started out with this guide http://forum.xda-developers.com/android/software/guide-build-port-miui-rom-to-device-t3250984 I have the Stock ROM as a base rom. I followed it until the "make firstpatch" command. After this I got rejects that the PatchROM couldn't fix by it self so I have to fix them manually before I can build the rom. These are the folders with rejects: Screenshot . I have around 45 rejects scattered inside those folders. I read this http://forum.xda-developers.com/chef-central/android/guide-patchrom-rejects-fixing-tutorial-t3203287 and this http://www.markusbe.com/2009/12/how-to-read-a-patch-or-diff-and-understand-its-structure-to-apply-it-manually/ reject guides but I'm having trouble understanding them.
About the other thing....If I don't have access to the system partition then how am I able to flash CyanogenMod 12.1 from Patrik?
denny.hell said:
Thank you for putting an interest in this. I started out with this guide http://forum.xda-developers.com/android/software/guide-build-port-miui-rom-to-device-t3250984 I have the Stock ROM as a base rom. I followed it until the "make firstpatch" command. After this I got rejects that the PatchROM couldn't fix by it self so I have to fix them manually before I can build the rom. These are the folders with rejects: Screenshot . I have around 45 rejects scattered inside those folders. I read this http://forum.xda-developers.com/chef-central/android/guide-patchrom-rejects-fixing-tutorial-t3203287 and this http://www.markusbe.com/2009/12/how-to-read-a-patch-or-diff-and-understand-its-structure-to-apply-it-manually/ reject guides but I'm having trouble understanding them.
About the other thing....If I don't have access to the system partition then how am I able to flash CyanogenMod 12.1 from Patrik?
Click to expand...
Click to collapse
I didn't mean you have NO access to all partitions. What I mean is there's partitions on there that you're not even capable of seeing because you're not s-off and can't access them. If you were s-off and opened a file explorer you'd see a bunch of other partitions that you never knew were there. Regarding the rejects you really have to set the build environment up 100% correctly otherwise it's just not going to work.. First it has to basically create every single file/folder/apk it needs before it will ever even compile it into a .zip flashable format.. That can take hours depending on your system... You're basically trying to do the same thing us devs do when we're building CM, just your trying to do MIUI instead..
Yes I know that it has to be 100% correct. It was all in the tutorial. I also know that it could take hours too. But first i have to fix those rejects. But I have no idea where to start with the fixing. I read the tutorials above and I can only understand the basic terminology. What I want to now is how to fix them....How to know what reject is for what. And surprisingly in those tutorials they never mention which file I should edit. The .rej file or the original file. I'm really confused with all that stuff.
I'm s-on and I can still see all of the partitions. I can't access them but I know they are there. My problem is flashing the system partition using TWRP. I'm gonna try tommorow to sign the ZIP before I flash it. Maybe that will do the trick.
denny.hell said:
I'm s-on and I can still see all of the partitions. I can't access them but I know they are there. My problem is flashing the system partition using TWRP. I'm gonna try tommorow to sign the ZIP before I flash it. Maybe that will do the trick.
Click to expand...
Click to collapse
Post the output of some of your errors/rejects so I can have a look at it.
MrMike2182 said:
Post the output of some of your errors/rejects so I can have a look at it.
Click to expand...
Click to collapse
Code:
*** UsbDeviceManager.smali 2016-02-29 02:52:29.596546250 +0100
--- UsbDeviceManager.smali 2016-02-29 02:58:30.861463482 +0100
***************
*** 196,234 ****
invoke-direct {p0}, Lcom/android/server/usb/UsbDeviceManager;->startAccessoryMode()V
:cond_0
- const-string v3, "ro.adb.secure"
-
- const/4 v4, 0x0
-
- invoke-static {v3, v4}, Landroid/os/SystemProperties;->getBoolean(Ljava/lang/String;Z)Z
-
- move-result v2
-
- .local v2, "secureAdbEnabled":Z
- const-string v3, "1"
-
- const-string v4, "vold.decrypt"
-
- invoke-static {v4}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;
-
- move-result-object v4
-
- invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
-
- move-result v0
-
- .local v0, "dataEncrypted":Z
- if-eqz v2, :cond_1
-
- if-nez v0, :cond_1
-
- new-instance v3, Lcom/android/server/usb/UsbDebuggingManager;
-
- invoke-direct {v3, p1}, Lcom/android/server/usb/UsbDebuggingManager;-><init>(Landroid/content/Context;)V
-
- iput-object v3, p0, Lcom/android/server/usb/UsbDeviceManager;->mDebuggingManager:Lcom/android/server/usb/UsbDebuggingManager;
-
- :cond_1
return-void
.end method
--- 196,201 ----
invoke-direct {p0}, Lcom/android/server/usb/UsbDeviceManager;->startAccessoryMode()V
:cond_0
return-void
.end method
***************
*** 1307,1333 ****
.end method
.method public clearUsbDebuggingKeys()V
! .locals 2
.prologue
- iget-object v0, p0, Lcom/android/server/usb/UsbDeviceManager;->mDebuggingManager:Lcom/android/server/usb/UsbDebuggingManager;
-
- if-eqz v0, :cond_0
-
- iget-object v0, p0, Lcom/android/server/usb/UsbDeviceManager;->mDebuggingManager:Lcom/android/server/usb/UsbDebuggingManager;
-
- invoke-virtual {v0}, Lcom/android/server/usb/UsbDebuggingManager;->clearUsbDebuggingKeys()V
-
return-void
-
- :cond_0
- new-instance v0, Ljava/lang/RuntimeException;
-
- const-string v1, "Cannot clear Usb Debugging keys, UsbDebuggingManager not enabled"
-
- invoke-direct {v0, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
-
- throw v0
.end method
.method public denyUsbDebugging()V
--- 1274,1283 ----
.end method
.method public clearUsbDebuggingKeys()V
! .locals 0
.prologue
return-void
.end method
.method public denyUsbDebugging()V
This is from /home/denny/htc_a11ul/temp/reject/services.jar.out/smali/com/android/server/usb/UsbDeviceManager.smali.rej
https://mega.nz/#!rJ4nDQBC this is the original file. It's too long to posted here. This is the decryption key: !bwcAZTgPWVEWQ7SLzhlgsIcwZ0Kuy8ob2esGpZa8QmU
It looks to me like you need to enable debugging because that's what it's saying and then right down at the bottom it says deny..
MrMike2182 said:
It looks to me like you need to enable debugging because that's what it's saying and then right down at the bottom it says deny..
Click to expand...
Click to collapse
I don't think that we understand each other well but never mind I reread the reject tutorial a couple of more times. I think I understood it The "-" sign at the beginning of each line means that I need to find those line in the original smali file and delete them. I've fixed almost all of the rejects and than I made another patch to see If I fixed them. And now it give me a double amount of rejects. I already posted in the original guide thread to see if someone there could explain me why I got double amount of rejects. I'm also going to open a thread on our forums about my idea and maybe someone here could help me out. Anyway, thank you for helping me and pushing me to move forward with this idea. I hope someday I can accomplish it
Related
[Mod] [ED01/EC01] Remove ADB Debugging Notification
If you're like me, you find the adb debugging notification to be unnecessary and aggravating. Here's the simplest way to get rid of it. Disassemble the services.jar using baksmali or apktool. Navigate to NotificationManagerService.smali. Search for this line Code: iput v7, v6, Landroid/app/Notification;->icon:I Simply comment it out Code: #iput v7, v6, Landroid/app/Notification;->icon:I Reassemble and adb push services.jar /system/framework/services.jar No more stupid and unecessary adb debugging notification For those not savy with smali/baksmali or apktool/apkmanager, I have attached a modded services.jar with the edits. Remove the .zip ending (xda won't lemme attach .jar) and adb push services.jar /system/framework/services.jar. BTW: I used the SbrissenMod services.jar as a base to include his previous edits/mods.
[DEV][BRAINSTORM] Fully-working CWM Recovery
While the recovery we have at the moment, fruit of the hard work of xantaro, unclecracker and digitalfrost, is enough for most operations there are some things bugging me that is in our interest to fix with the ultimate aim of adding it to ROM Manager and thus get official support. Current issues: 1. It isn't the latest version of CWM and isn't official. 2. It doesn't have USB mount working. 3. It doesn't have ADB working. 4. It doesn't support EXT4. Now, I have tried to fix these but recoveries are a new domain for me and at a first attempt I couldn't bring some of these to work. Compiling the latest version was easy and an important first step towards official; however, all others I couldn't do it and I don't think we should talk with koush before fixing all this. Here are my short attempts: - For USB mount I defined on the BoardConfig the path for UMS lun0 file. The path seems to be correct and there's no other file in /platform/ as I've found out by running a ls -R. I have no idea why it's not working. - For ADB, I made sure the persist.adb.service is set to 1 and the init.rc is starting it. This being said, I don't know what's missing. Perhaps this is of interest? - For EXT4 support I thought it was just a matter of adding alternative FS to recovery.fstab. Seems I was wrong though. So, does anyone want to join in and help? This is really new territory to me and I have a quite faint idea of what I'm doing. A few guidelines: - Read this to get an idea. - You'll need CM sources (repo init... repo sync...) - The CWM recovery source is in /bootable/recovery - Here is my device source and a patch file for some changes on recovery src * - Run build commands (. build/envsetup.sh, lunch full_p970-eng, make -j4 recoveryimage) * If you don't change what I did on the recovery source you won't have a key to select. Also, I have CWM 4.x at the moment on my OB but since it does the same as the already posted 3.x I don't deem necessary to share it; but if anyone wants, I'll upload it. I'll join the party when I come from the mini-vacations, hope there'll be some progress meanwhile!
Great i'll try to do some help,maybe little
If anyone wants you can request a pull from my source. Also, here's a flashing CWM 4.x. I renamed it Nova recovery for the lulz. http://www.multiupload.com/R7WGNYTL7G
Changes on the Source to get selectbutton to work shouldn´t be necessary. Adding "BOARD_HAS_NO_SELECT_BUTTON := true" to boardconfig.mk suffices to get selectbutton to work. EXT4 Backup and Restore worked for me after editing the fstab file. For the ADB and USB mount problem i have no Idea what is missing. Like you said, adb daemon should get started througt the initscript. BTW. seems like the Progressbar isn´t working on the newer Versions of CWM
xantaro said: EXT4 Backup and Restore worked for me after editing the fstab file. Click to expand... Click to collapse Could you release a new version or tell us how to do it? Thanks
To get EXT4 working in my O2X builds my /data line looks like this: Code: /data ext3 /dev/block/mmcblk0p9 NULL auto
xantaro said: Changes on the Source to get selectbutton to work shouldn´t be necessary. Adding "BOARD_HAS_NO_SELECT_BUTTON := true" to boardconfig.mk suffices to get selectbutton to work. Click to expand... Click to collapse I thought the flag wasn't suffice. Thanks. Rusty! said: To get EXT4 working in my O2X builds my /data line looks like this: Code: /data ext3 /dev/block/mmcblk0p9 NULL auto Click to expand... Click to collapse Nice tip, I'll try.
knzo said: While the recovery we have at the moment, fruit of the hard work of xantaro, unclecracker and digitalfrost, is enough for most operations there are some things bugging me that is in our interest to fix with the ultimate aim of adding it to ROM Manager and thus get official support. Current issues: 1. It isn't the latest version of CWM and isn't official. 2. It doesn't have USB mount working. 3. It doesn't have ADB working. 4. It doesn't support EXT4. Click to expand... Click to collapse Hey, I know this is an old thread but still if u have not resolved the problem with ADB and USB follow these instruction: Before we start: My mobile is Spice Mi-410 (Qualcomm made), also known as Cherrymobile magnum, Wellcomm, Motorola triumph in different countries. So may be these tweak will not work with your device. (But you can give it a try ) I hope you know how to unpack recovery.img of your device (or boot.img if your recovery ramdisk is stored in boot.img like Xperia Arc) if not then follow this guide to unpack recovery.img and extract recovery ramdisk into a folder. Tweak For ADB: Open init.rc file from recovery ramdisk/initram using any editor of your choice Put this line at the end of "on init" section Code: write /sys/module/g_android/parameters/product_id #### where #### should be replaced by your device's product id. (if you dont know what it is then connect your mobile to PC and issue "lsusb" command in ubuntu terminal, you should see something like this Bus 001 Device 027: ID 0489:c000 Foxconn / Hon Hai Here c000 is my devices product id and Foxconn is my device's manufacturer) Though /sys/module/g_android is not present in our device but this worked for me. Please note that the device id is case sensitive, so write what you see on PC For USB: For this add following line at the end of "on boot" section in init.rc file Code: echo 1 > /sys/class/usb_composite/usb_mass_storage/enable For your device first confirm the location of /sys/class/ ###### / ####/usb_mass_storage/enable Since this location vary from device to device. This should enable usb storage mounting from recovery. Best of luck!!
One option for load rootfs image in native mode is necesary enviado
[FIX] Get Out Of "Test Mode"
All credit for this find goes to alasdair529. alasdair529 said: What I did was, I went into LGPNST and I took the VS910 dll and the original VS910ZV4_04.S4_04.P58008.R5.user.tot found here: http://forum.xda-developers.com/show....php?t=1120062 and put my phone in download mode (emergency mode) holding power buttone and volume up and I flashed it using LGPNST and Voila my phone is back to normal, no more test mode. My phone is perfect working condition with all usb modes and internet connection working, no more test mode. Also my phone is back to charging normal. I am so happy I fixed this, I was about to sell it and get something else honestly there is nothing more to it then that took about 1 minute to set it all up then LGNPST did all the work, very simple, I just don't know why no one else on Google could figure this out or at least post a guide to it if they did, feel free to make a post in the development section, can't wait for mtmichaelson to see this and fix his phone too! Click to expand... Click to collapse
I tried to flash v4 or v6, but after that it doesn't boot. v7, it boots well, but still shows me usb test mode or usb factory mode weird...
lentm said: I tried to flash v4 or v6, but after that it doesn't boot. v7, it boots well, but still shows me usb test mode or usb factory mode weird... Click to expand... Click to collapse I've had factory cable connected a new USB cable fixed that. Sent from my VS910 4G using xda premium
I found that fix out also, but I would like to know how to ax test mode without haveing to roll back to Froyo. Because, correct me if I'm wrong, but won't flashing the v7 tot file again just create the test mode issues all over again?
atomD21 said: I found that fix out also, but I would like to know how to ax test mode without haveing to roll back to Froyo. Because, correct me if I'm wrong, but won't flashing the v7 tot file again just create the test mode issues all over again? Click to expand... Click to collapse Yes it will Sent from my Dread Ginger Revo using Tapatalk.
Not to dread this up again, but has anyone had any progress on this? Do we know where testmode is being set? Kernal, Radio, ROM...APK? I would think if it were a bootup setting somewhere, we should be able to do a file or text-in-file search from root up up through the child folders within the core OS. If it were in the APKs, the settings could be in the XML prefs somewhere.. still very searchable. I have my step-daughters phone stuck in test mode... /= I dont what to re-create the wheel and spend hours doing stuff that has been done.... so I ask you all this: what do we know so far? Has a simple OS level search in the linux system been done? Is it something in in one of the .rc init files? It must be somewhere and if we re-root after the TOT, then we should be able to fix this. Any of the custom ROMs have this if we flash over the TOT? That would rule out APK and ROM settings.
Today I ended up doing a full factory reset, flashed clean V7 tot, then the V8 tot and re-rooted, and finally installed the new breakout rom and I'm still in test mode...
nasaiya said: Today I ended up doing a full factory reset, flashed clean V7 tot, then the V8 tot and re-rooted, and finally installed the new breakout rom and I'm still in test mode... Click to expand... Click to collapse So this would eliminate ROM and APK. What are we left with... kernel, radio or recovery partition? Some other hidden partition? The TOT does a complete re-partition so there must be some hidden key in here somewhere. I wish I were one of the heavy ROM guys, but I'm just a linux novice and decent developer. Lets keep brainstorming!
Well I'm just guessing here so bear with me... AFAIK the cause is flashing in emergency download mode, which is something outside of the normal system, and also outside of the recovery partition. Based on that (and the previous post) I'd guess it set a test mode flag somewhere on another partition that gets "checked" at boot. I figure we ought to be able to get images of all the partitions with dd but I wouldn't know what to do with that data once I had it... Maybe compare with a non-test-mode phone and look for inconsistancies. I could be totally wrong though I'm not very familiar with the boot process and that sort of thing. EDIT: found this: http://wiki.rootzwiki.com/LG_Revolution_Software_Breakdown Maybe it sets a flag in the MISC partition like it does to boot into recovery or something like that. That stuff is a bit over my head though.
nasaiya said: Well I'm just guessing here so bear with me... AFAIK the cause is flashing in emergency download mode, which is something outside of the normal system, and also outside of the recovery partition. Based on that (and the previous post) I'd guess it set a test mode flag somewhere on another partition that gets "checked" at boot. I figure we ought to be able to get images of all the partitions with dd but I wouldn't know what to do with that data once I had it... Maybe compare with a non-test-mode phone and look for inconsistancies. I could be totally wrong though I'm not very familiar with the boot process and that sort of thing. EDIT: found this: http://wiki.rootzwiki.com/LG_Revolution_Software_Breakdown Maybe it sets a flag in the MISC partition like it does to boot into recovery or something like that. That stuff is a bit over my head though. Click to expand... Click to collapse That's a great find. I'm going to spend some time reviewing that data in hopes that it is something as simple as tweaking one of those partitions.
Sounds good. I'm happy to help with this in any way possible, so let me know if you need anything... Having to use adb to transfer files all the time is annoying!
I started playing around in the android OS and here are some files I found that ahve "testmode" within them. I tried doing a full system search, but the 'find' keeps stalling/freezing. init.rc has some, what looks like, programmer patch scripts in it that directly affect testmode. What's funny is that each "patch" is labeled by the devs email address! We could probably email the guy to find out how to disable testmode.... (= # find . -type f -exec grep -l "testmode" {} + 2> /sdcard/err.log ./init.rc ./system/lib/libandroid_runtime.so ./system/lib/libhardware_legacy.so ./system/app/VerizonHiddenMenu.apk ./system/app/Settings.apk ./system/app/LgHiddenMenu.odex ./system/app/LgHiddenMenu.apk ./system/etc/efs.txt ./system/framework/framework.odex ./system/bin/btld ./system/bin/lg_diag_app ./sys/devices/platform/testmode/uevent ./sys/devices/platform/testmode/modalias
I emailed one of the engineers listed in the init.rc file.... MAYBE if we're lucky, he'll help us out.
So far, not looking good. I think he may be thinking I was it disabled in the core, but he doesn't understand that its running actively. Code: [B]Eric <[email protected]> Wed, Apr 4, 2012 at 9:13 AM To: 김세현 <[email protected]>[/B] [I]Thank you for your response! Can testmode be disabled in Linux or from Android. Can we dial a code to turn it off? How can I turn it off? Do you know how or can hint at how to do it? Thank you again[/I] [B]김세현 <[email protected]> Wed, Apr 4, 2012 at 9:25 AM To: Eric <[email protected]>[/B] [I]Impossible!! If you are guru, then you can disable it and then it make a brick. It’s useless job. Why are you trying that? Give up I suggest. Testmode is lg version of QCT diag cmd set. BR.[/I]
Guys, test mode is embedded deep inside the kernel source. Disabling it in one place will cause it to not build because it is referenced in another file. Remove it from there and it won't build because of another. Etc., etc., etc. Now what you can try is asking if he knows which partition holds the flag for test mode. It is obviously not /boot, /data, /system/, or /recovery. Sent from my VS920 4G using Tapatalk
mtmichaelson said: Guys, test mode is embedded deep inside the kernel source. Disabling it in one place will cause it to not build because it is referenced in another file. Remove it from there and it won't build because of another. Etc., etc., etc. Now what you can try is asking if he knows which partition holds the flag for test mode. It is obviously not /boot, /data, /system/, or /recovery. Sent from my VS920 4G using Tapatalk Click to expand... Click to collapse Hey mt, Do we know why emergency mode installed tot's flag testmode whereas regular installed tot's (from cwm recovery or usbmode) dont flag flag testmode? Same tot's same kernel, right? Is it possible to pull the other mounts images (not /system, /data, etc) and push them to a testmode device?
I don't believe it's tots flashed from emergency mode per se, but rather phones that had bad recoveries installed first, then flashed in emergency mode. Sent from my VS920 4G using Tapatalk
mtmichaelson said: I don't believe it's tots flashed from emergency mode per se, but rather phones that had bad recoveries installed first, then flashed in emergency mode. Sent from my VS920 4G using Tapatalk Click to expand... Click to collapse Agreed. Now, where is the flag, byte offset, or whatever that is flagging the whole system to be in 'testmode'. If it can be set, it can be unset. Since /system, /data and /cache are wiped and replaced with a new ROM, then that leaves one of the other.. what (3 or 4) mounted partitions that could contain this flag. Maybe the rootfs contains this flag as a byte offset? Again, what if a partition from a non-testmode device was exported and pushed to a testmode device? Is there a way to compare these other partitions byte for byte between a good and testmode device? How I wish I was a linux guru right now.... damn you Microsoft!
I found a program called wxHexEdit that seems about right for the job... It can compare two binary files / images. I'm currently having a peek at the MISC partition but I don't have a non-testmode copy to compare it with. If someone could hook me up with an image (mmcblk0p8) from a non-test-mode phone that would be great!
I got out of test mode easy, just csll verizon and get a new phone.
NFC with screen off/screen locked
Hello, NFC does not work when the screen is off or locked. XlAfbk has explained the steps to follow in order to make the NFC working with the screen locked. This is working very well on my Note 8 (SM-N9500) with Android 8.0 (does not break SafetyNet and works with NFC payments). The steps: 1. Pull NfcNci.apk from your device: adb pull /system/app/NfcNci/NfcNci.apk 2. Download smali-<version>.jar and baksmali-<version>.jar from https://bitbucket.org/JesusFreke/smali/downloads 3. Put NfcNci.apk and the 2 .jar files in the same directory 4. open a command prompt in that directory 5. open NfcNci.apk with 7z/winzip/winrar/... and extract classes.dex from it (into the same directory) 6. run: java -jar baksmali-<version>.jar classes.dex -o out 7. navigate to directory out\com\android\nfc 8. open NfcService.smali in a text editor 9. search for "android.intent.action.SCREEN_OFF" and replace with "android.intent.action.SCREEN_OFFA" 10. search for "android.intent.action.SCREEN_ON" and replace with "android.intent.action.SCREEN_ONA" 11. search for "android.intent.action.USER_PRESENT" and replace with "android.intent.action.USER_PRESENTA" 12. search for "android.intent.action.USER_SWITCHED" and replace with "android.intent.action.USER_SWITCHEDA" 13. search for ".method private computeDiscoveryParameters" -> about 20 lines below it should be a line like "if-lt v2, p1, :cond_5b" -> replace the 2 parameters in that function (in this example: "if-lt p1, v2, :cond_5b") 14. open ScreenStateHelper.smali in a text editor 15. search for ".method checkScreenState()I" -> change all the return values ("const/4 v0, 0x...") to "const/4 v0, 0x3" 16. run: java -jar smali-<version>.jar out -o classes.dex 17. open NfcNci.apk with 7z/winzip/winrar/... and add classes.dex to it 18. push the modded apk to your device: adb push NfcNci.apk /system/app/NfcNci/NfcNci.apk. Do not forget to make a backup of the original NfcNci.apk before. 19. chmod 644 /system/app/NfcNci/NfcNci.apk All credit goes to the original writer of the guides: https://forum.xda-developers.com/xposed/modules/mod-nfc-unlocking-based-t2478163/post59941326 Alternately, you can download the modded NfcNci.apk and install it with adb. This is for the Note 8 (SM-N9500) with Android 8.0. It might work for other versions of Note 8.
Nice. I'm guessing root is required?
Yes. Root is required. oddbehreif said: Nice. I'm guessing root is required? Click to expand... Click to collapse
LeBobbo said: Hello, NFC does not work when the screen is off or locked. XlAfbk has explained the steps to follow in order to make the NFC working with the screen locked. This is working very well on my Note 8 (SM-N9500) with Android 8.0 (does not break SafetyNet and works with NFC payments). The steps: 1. Pull NfcNci.apk from your device: adb pull /system/app/NfcNci/NfcNci.apk 2. Download smali-<version>.jar and baksmali-<version>.jar from https://bitbucket.org/JesusFreke/smali/downloads 3. Put NfcNci.apk and the 2 .jar files in the same directory 4. open a command prompt in that directory 5. open NfcNci.apk with 7z/winzip/winrar/... and extract classes.dex from it (into the same directory) 6. run: java -jar baksmali-<version>.jar classes.dex -o out 7. navigate to directory out\com\android\nfc 8. open NfcService.smali in a text editor 9. search for "android.intent.action.SCREEN_OFF" and replace with "android.intent.action.SCREEN_OFFA" 10. search for "android.intent.action.SCREEN_ON" and replace with "android.intent.action.SCREEN_ONA" 11. search for "android.intent.action.USER_PRESENT" and replace with "android.intent.action.USER_PRESENTA" 12. search for "android.intent.action.USER_SWITCHED" and replace with "android.intent.action.USER_SWITCHEDA" 13. search for ".method private computeDiscoveryParameters" -> about 20 lines below it should be a line like "if-lt v2, p1, :cond_5b" -> replace the 2 parameters in that function (in this example: "if-lt p1, v2, :cond_5b") 14. open ScreenStateHelper.smali in a text editor 15. search for ".method checkScreenState()I" -> change all the return values ("const/4 v0, 0x...") to "const/4 v0, 0x3" 16. run: java -jar smali-<version>.jar out -o classes.dex 17. open NfcNci.apk with 7z/winzip/winrar/... and add classes.dex to it 18. push the modded apk to your device: adb push NfcNci.apk /system/app/NfcNci/NfcNci.apk. Do not forget to make a backup of the original NfcNci.apk before. 19. chmod 644 /system/app/NfcNci/NfcNci.apk All credit goes to the original writer of the guides: https://forum.xda-developers.com/xposed/modules/mod-nfc-unlocking-based-t2478163/post59941326 Alternately, you can download the modded NfcNci.apk and install it with adb. This is for the Note 8 (SM-N9500) with Android 8.0. It might work for other versions of Note 8. Click to expand... Click to collapse Have you upgraded to pie, and does this mod still work? I'm not on a Samsung device but want to make the mods myself, just wondering if anything has changed from oreo to pie
Question Realme X7 5G - Stuck on "RECOVERY MODE"
Please help ! My device is stuck on Recovery Mode. I had unlocked boot loader and rooted the device. Hadn't put any custom ROM yet. When the banking app didn't work, i deleted Magisk and to reset my device i pressed erase all and reset. That is when it switched off and is stuck in recovery mode. I have everything possible and nothing is helping. The service center guy didn't even try when he saw Recovery Mode and said it's a hardware issue and i will have to wait till lockdown ends. i really don't think it has anything to do with hardware. Brom bypass gave me following error. [2021-06-07 13:02:36.101083] Waiting for bootrom [2021-06-07 13:03:59.447937] Found port = COM7 Traceback (most recent call last): File "main.py", line 171, in <module> main() File "main.py", line 63, in main raise e File "main.py", line 56, in main config = Config().default(hw_code) File "C:\Program Files (x86)\Crack D Max\bin\src\config.py", line 14, in default self.from_file(config, hw_code) File "C:\Program Files (x86)\Crack D Max\bin\src\config.py", line 27, in from_file raise NotImplementedError("Can't find {} hw_code in config".format(hw_code)) NotImplementedError: Can't find 0x996 hw_code in config Please please help !!
Puneeth84 said: Please help ! My device is stuck on Recovery Mode. I had unlocked boot loader and rooted the device. Hadn't put any custom ROM yet. When the banking app didn't work, i deleted Magisk and to reset my device i pressed erase all and reset. That is when it switched off and is stuck in recovery mode. I have everything possible and nothing is helping. The service center guy didn't even try when he saw Recovery Mode and said it's a hardware issue and i will have to wait till lockdown ends. i really don't think it has anything to do with hardware. Brom bypass gave me following error. [2021-06-07 13:02:36.101083] Waiting for bootrom [2021-06-07 13:03:59.447937] Found port = COM7 Traceback (most recent call last): File "main.py", line 171, in <module> main() File "main.py", line 63, in main raise e File "main.py", line 56, in main config = Config().default(hw_code) File "C:\Program Files (x86)\Crack D Max\bin\src\config.py", line 14, in default self.from_file(config, hw_code) File "C:\Program Files (x86)\Crack D Max\bin\src\config.py", line 27, in from_file raise NotImplementedError("Can't find {} hw_code in config".format(hw_code)) NotImplementedError: Can't find 0x996 hw_code in config Please please help !! Click to expand... Click to collapse Hello bro I have also realme x7 ..but I have tried to do root but I didn't .plz help me out if u can and guide me how to root my realme x7 .and didn't find any custom rom and deep testing apk for it
I can try recover your phone via teamviewer