Navigation

    UBports Robot Logo

    UBports Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. AlainW94
    3. Best
    • Profile
    • Following 0
    • Followers 0
    • Topics 12
    • Posts 143
    • Best 41
    • Groups 0

    Best posts made by AlainW94

    • Backup and restore using ubports-installer

      Hi all, I'm doing some modifications to the ubports-installer in order to be able to manage user and system data backup and restore.

      I have added a backup button on the install screen :
      1.png

      When you click on it you will have the following screen :

      2.png

      The installer will read the size of both system and userdata partition and give you an estimated sized need on your disk. You can name your backup. When you will click ok let's go, the phone will reboot into recovery and the backup will start :

      Capture du 2019-12-03 20-05-51.png

      At this and the phone will reboot into the OS. you will be able to find 2 tar file on your computer disk : one for the system-data, the other one for the user-data.

      It is actually working fine on Meizu Pro 5.
      BUT, in one of my previous thread, I had the issue that in recovery image, the user and system data partition was not mounted on /data.

      In the installer code, I added for the Meizu Pro 5 the mounting of sda44 on /data/

      So my questions to you are :

      • Who else on different phone models have the partition /data/user-data, /data/system-data not mounted in recovery ? If that is the case, what is your partition device to mount ?
      • does every one have the folder user-data and system-data in the /data folder while in recovery ?
      • Are you ok with this feature or do you find it usless ?

      I will now write the restore option.

      posted in App Development
      AlainW94
      AlainW94
    • RE: MX4 Ubuntu Edition: FAILED (remote: unknown command)

      @jamieweb pull it from github, here are my personal notes when I did it :

      git clone https://github.com/ubports/ubports-installer.git
      cd ubports-installer
      npm run-script dist:linux
      ./setup-dev.sh
      npm start
      
      posted in Support
      AlainW94
      AlainW94
    • RE: PinePhone

      @PINE64 You mean the SanDisk flash ? 😂 😂 👍

      posted in General
      AlainW94
      AlainW94
    • RE: MX4 Ubuntu Edition: FAILED (remote: unknown command)

      @jamieweb Of course, no problem at all if that can help other people experiencing this with their Meizu 😉 If you need help for your script, please post in your original thread and I will try to help you. Good job.

      posted in Support
      AlainW94
      AlainW94
    • RE: WiFi password loss after each and every reboot on MEIZU Pro 5

      @ubuntoutou Ok, we progress... normaly SN should display the serial number of the phone (the one you get with adb devices. And the two line should display your WiFi mac addresses.

      on my phone it give :

      Mar  6 19:02:40 ubuntu-phablet kernel: [    1.246534]  [5:  kworker/u16:1:   59] [c5] @@@@ SN 860BCMSxxxxx
      Mar  6 19:02:40 ubuntu-phablet kernel: [    1.246746]  [5:  kworker/u16:1:   59] [c5] @@@@ MAC 68:3E:34:xx:yy:58
      Mar  6 19:02:40 ubuntu-phablet kernel: [    1.246957]  [5:  kworker/u16:1:   59] [c5] @@@@ MAC 68:3E:34:xx:yy:59
      

      We have now to find what part of the kernel is giving thoses informations, if anybody had an idea ... you are welcome

      posted in Support
      AlainW94
      AlainW94
    • RE: (Solved) - List installed apps

      @Flohack Hi back, thanks for your answer, I finally manage to do my backup and restore with success (thanks goolge).

      I share here how I did:

      Backup :

      #!/bin/bash
      echo "Backing up your data"
      adb reboot recovery
      sleep 15
      adb shell mount /dev/block/sda44 /data
      adb shell mkfifo /backup.pipe 
      adb exec-out 'tar -cvp data/system-data 2>/backup.pipe' | dd of=system.tar & adb shell cat /backup.pipe &
      adb shell rm /backup.pipe
      adb shell mkfifo /backup.pipe 
      adb exec-out 'tar -cvp data/user-data 2>/backup.pipe' | dd of=user.tar & adb shell cat /backup.pipe &
      adb shell rm /backup.pipe
      adb reboot
      

      With this script, you will mount the data partition under the recovery mode, create a pipe to transfer the content of the folder (/data/user-data) through stdout to dd on the local computer in a file named user.tar, then it will do the same for the folder system-data.

      Now to restore :

      #!/bin/bash
      echo "Restoring your data"
      adb reboot recovery
      sleep 15
      adb shell mount /dev/block/sda44 /data
      adb shell mkfifo /resto.pipe
      adb push user.tar /resto.pipe & adb shell 'cd /; cat /resto.pipe | tar -xv'
      adb shell rm /resto.pipe
      adb shell mkfifo /resto.pipe
      adb push system.tar /resto.pipe & adb shell 'cd /; cat /resto.pipe | tar -xv'
      adb reboot
      

      This script will boot the phone into recovery mode, mount the sda44 partition into /data folder, push your backup user.tar through the previously created pipe. On the phone the pipe is catched by cat then sent to tar for decompressing.

      Your backup needs to be in the same folder as the script restore because I written it like this.

      Credits goes there : https://www.forum-generationmobiles.net/t78912-tutoriel-backup-adb-sauvegarde-compressee-des-donnees-de-android-vers-votre-pc-gnu-linux

      I tested it and it's perfectly working, I was able to clone one of my Pro 5 to the other one Pro5.

      sda44 partition is mostly for Pro5, not sure that this mount works on other model.
      I hope that this could help other people.

      The best way is maybe to add this feature to ubports-installer, in order to be able to just backup/restore our phone (and of course re-installing it) only with one tool.

      What are you thinking about that ?

      posted in OS
      AlainW94
      AlainW94
    • RE: SDK documentation

      Thanks @dobey once again. I have nothing to modify in it, just trying to save time by copying a portion of existing code to create a new ListView for the VVM messages in the dialer-app, I copy the ListView from the call history and I was looking for the structure of the model.

      I added a button (that will be showed only if the service is activated) on the dialer page :
      screenshot20190330_000034438.png

      That will display a new page :

      screenshot20190330_000021658.png

      I would like to display a play line when we touch the item (like the iphone style).

      posted in App Development
      AlainW94
      AlainW94
    • RE: Q&A 46 Saturday 23rd Of March At 19:00 UTC

      What is currently the status of the sensors on all the devices that are running UT ? You all know that each device came with a lot of sensors (accelerometer, gps, magnetometers, nfc ....) are they working well on all devices ? for my device it is not the case. Do you plan to share some code example for developers who like to used them in some app?This can be very appreciated! For example NFC can be very usefull. I understand that making an OS stable is very difficult when it run on a lot of different devices but actually UT is far away to be unstable, can we imagine to have now more working device's functionalities for the existing one ?

      posted in News
      AlainW94
      AlainW94
    • RE: On this (US) Thanksgiving...

      It's my turn to thanks this community, especially @Flohack @dobey @Lakotaubp @advocatux @Stefano @hummlbach for their help on my different thread.

      Thanks to all for keeping ubuntu-touch alive as it is now since 5 years my only operating system on phone.

      Thanks to all I forget to mention for their helps and may the force be with us to continue in this best world way.

      And thanks @AppLee for the mention 😉

      posted in General
      AlainW94
      AlainW94
    • RE: SimJacker, are UbPorts's phone affected ?

      @advocatux Wooups .. Sorry again ... and Thanks !

      posted in General
      AlainW94
      AlainW94
    • Visual Voice Mail Configuration

      Hi to all, I'm currently writing an application that will handle the visual voice mail for our favorite OS. The app will allow you to hear your voicemail messages and to see them as a list in the dialer-app.

      But at that time, I would like to share with you how I did to configure it in Dekko2.

      What is visual voice mail ?
      Usually when someone could not reach you, he can leave you a message in your voicemail box, you have then to call your box a listen the message (and delete it using a number on your keypad).

      The visual voice mail (vvm service) is a service that need to be activated for your account from your provider interface (call or web). This service require a data connection. When a people will not be able to reach you and leave you a message, your provider will send a hidden sms to your device (SMS CLASS 1 or 0) to inform a local application on your device about the need of download the message from an imap (mail) server. When you activate this service, your provider will send a hidden SMS to your device with your credential's information (imap server address, port, login, password), a dedicated app on your device will store it in a database.

      I'm trying to write the app that will handle all of that but for now, I will try to explain to you how you can receive this SMS and try to configure Dekko2 (yes I said try because it was a kind of magic to get it to work) with the imap informations for getting your voicemails inside.

      Configuration
      First, you will have to active the debug on ofono (the process on our devices that handle sms and other things related to the cellular phone modem), to do that, put your file system in read write :

      sudo mount -o remount,rw /
      

      edit the file : /etc/init/ofono.conf

      sudo nano /etc/init/ofono.conf
      

      add this lines before the 'exec' line :

      env OFONO_RIL_TRACE=y
      export OFONO_RIL_TRACE
      

      Restart your phone.

      Now run the following command (via adb or terminal) :

      tailf /var/log/syslog |grep ofonod
      

      it's time to activate the vvm service from your account.
      Once activated, wait and look in this logs for a UNSOLICITED SMS arrival, you should see something like that :

      Mar 25 22:33:06 ubuntu-phablet ofonod[2593]: [1,UNSOL]< UNSOL_RESPONSE_NEW_SMS {07913xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxB0D}
      Mar 25 22:33:06 ubuntu-phablet ofonod[2593]: SMS
      Mar 25 22:33:06 ubuntu-phablet ofonod[2593]: ME Download message ignored
      
      

      Copie the content located between the {}, it is the binary content of the SMS in PDU format. We will now use an online PDU decoder to have our SMS in clear text.

      Go on this site :
      https://www.diafaan.com/sms-tutorials/gsm-modem-tutorial/online-sms-deliver-pdu-decoder/

      Paste your hexadecimal content in the "SMS DELIVER PDU" box then click on Decode.

      In the table under, you will have the clear text message in front of the "Message" item. read this line, inside you will find all the needed information to connect to your imap provider, you will need those information :

      • srv or server= your imap mail server !
      • ipt or port = the port for the imap connection (ex 993 or 143)
      • u or name = your user name
      • pw = your personal password.

      Now you are ready for configuring Dekko.

      You can put your file system again in read/write mode and disable the ofono log by removing the two lines added before, the reboot the phone.

      Configuring Dekko

      To access the imap server of your provider, you have to switch off your wifi connection, the connection must be done via the cellular modem, so, switch off your WiFi for now.

      Open Dekko and go to the settings to add a new account, choose IMAP, name it VVM or whatever you want, enter a description.
      Your email address is your username@your_domain_provider ex: 123456@vvm.sfr.net, enter your password then click next. AND then come the magic ...

      You have to know that in a normal working way, your device have to send a sms to your provider that tell the service is ready to be used on your phone. I didn't do that. I just try to connect with Dekko and after some hours (maybe the activation time), it downloaded the list of messages. You will have to play in the settings with the kind of crypting (SSL/TLS), the authentification way (I used LOGIN), maybe to manually enter the name of the INBOX in the folders options ... don't put a refresh time to short (I setup a check every 50 minutes or less but not every 5 minutes) normally your provider will expect a connection of your device when somebody leaves you a message, my provider seems to be more tolerant and the server accept my connection all the time.

      It works well for me like this way but it is really provider depend. it could not be a success for everyone.

      Here some screenshot from my Dekko (in French 😉 )

      screenshot20190325_230144569.png
      screenshot20190325_230203670.png screenshot20190325_230218712.png

      I hope that it will be usefull for some of you at least.

      Alain

      posted in General
      AlainW94
      AlainW94
    • RE: UT on Meizu MX4 without using physical buttons

      @jamieweb You can also take a look at repowerd, it seems to be the deamon that is handling the power button : launchpad repowerd I see some event of it in syslog when pressing the power button.

      posted in General
      AlainW94
      AlainW94
    • RE: UT on Meizu MX4 without using physical buttons

      With this command you will lock the user screen but not power off the display :

      loginctl lock-session c1
      
      posted in General
      AlainW94
      AlainW94
    • RE: UT on Meizu MX4 without using physical buttons

      @jamieweb The only things I found back from my notes regarding D-BUS is this :

      signal time=1544722135.567846 sender=:1.0 -> destination=(null destination) serial=8601 path=/com/ubuntu/Upstart; interface=com.ubuntu.Upstart0_6; member=EventEmitted
         string "dbus"
         array [
            string "SIGNAL=Activity"
            string "BUS=system"
            string "INTERFACE=com.canonical.Unity.UserActivity"
            string "OBJPATH=/com/canonical/Unity/UserActivity"
            string "SENDER=:1.21"
            string "ARG0=0"
         ]
      
      signal time=1544722135.795139 sender=:1.0 -> destination=(null destination) serial=8602 path=/com/ubuntu/Upstart; interface=com.ubuntu.Upstart0_6; member=EventEmitted
         string "dbus"
         array [
            string "SIGNAL=Activity"
            string "BUS=system"
            string "INTERFACE=com.canonical.Unity.UserActivity"
            string "OBJPATH=/com/canonical/Unity/UserActivity"
            string "SENDER=:1.21"
            string "ARG0=1"
         ]
      

      When the home button is pushed. I'm not sure that this will help you a lot...

      posted in General
      AlainW94
      AlainW94
    • RE: UT on Meizu MX4 without using physical buttons

      @jamieweb Hi ! I did not have my notes under the hand for now but one things that you can try to reduce the amount of dbus messages is to switch off gsm/wifi/bluetooth you should have less messages over dbus. Tomorrow I will take a look at my notes to check what can be useful for you.

      posted in General
      AlainW94
      AlainW94
    • RE: UT on Meizu MX4 without using physical buttons

      @jamieweb You can maybe try with a cron task, but I think that you will have to set the filesystem as writtable before to setup your task. Try to run your task every 2 second if it's a script. if you have a loop insinde then you can run it at startup. PS : I don't know if cron is still running when the phone is sleeping, I think yes but without testing it ...

      posted in General
      AlainW94
      AlainW94
    • RE: UT on Meizu MX4 without using physical buttons

      @jamieweb I worked on dbus a little with my pro5 finger print reader. included in the home button . From memories the home button send a signal ove dbus or a proximity valus from the finger. I think that an app can read this value but it nerd to run even if the phone is sleeping and this is the problem as when the phone is sleeping, no app are running anymore excepted core apps

      posted in General
      AlainW94
      AlainW94
    • RE: UT on Meizu MX4 without using physical buttons

      @jamieweb the on device terminal will be paused when the device will go to sleep so you will not see anything with dbus

      posted in General
      AlainW94
      AlainW94
    • RE: UT on Meizu MX4 without using physical buttons

      @jamieweb you can spy dbus with dbus-monitor on a adb shell terminal , then try to lock and wake up the phone, you shoulder be able to see the commands that you need .

      sudo dbus-monitor --system 
      
      posted in General
      AlainW94
      AlainW94
    • RE: Cant receive pictures through mms??

      @tricky said in Cant receive pictures through mms??:

      07918405210077F76404913305000491308291742140790605040B8423F02B06246170706C69636174696F6E2F766E642E7761702E6D6D732D6D65737361676500B487AF848C82986353764D61636E7345484341008D9083687474703A2F2F67656F313A383030322F6353764D61636E73454843410088048102A8BF890B80353038303036393434008A808E03049A42

      Well your SMS is arrived, it is the stream above.
      you said that you got it into your history db ? Right ?

      If yes, in the DB there is a column for the attachment, can you check if it exist in the attachment folder please (./.local/share/history-service/attachments) ?

      posted in Support
      AlainW94
      AlainW94